surprise-crud

0.3.2 • Public • Published

Surprise-CRUD

📘 Documentation page 📙

It's a package which creates default CRUD options for Your applications. You don't have to care about:

  • GET,
  • GET By ID,
  • GET with Pagination,
  • POST,
  • PUT By ID,
  • DELETE By ID

It will setup it for You.

You can also check out my surprisejs-cors library, which setup cors in Your express app very quickly, with small amount of work from Your side.

Prerequisites

You will need the following things installed on your computer. At this moment, this package works only with MongoDB and Express, but soon will be working also with PostgreSQL database and Koa.js framework

  • Node.js (with NPM)

  • Express

  • MongoDB

  • Mongoose

  • Project configured with:

    • working express.Router(),
    • working connection to MongoDB
    • bodyParser
  • or just use my example app from Configuration with examples section.

Installation

Just simply install package with npm: npm install --save surprise-crud

Setup

After installing package, go to any of Your route file ( or create new one ) and import package:

import { crud } from 'surprise-crud'

OR

const { crud } = require('surprise-crud')

Now we can move to configuration.

Configuration with examples

In documentation & example app

Example app ❗ 📘 Documentation page 📙

Tests

Soon

Problems

If You get some problems, don't be afraid to contact or create an issue :)

Package Sidebar

Install

npm i surprise-crud

Weekly Downloads

11

Version

0.3.2

License

ISC

Unpacked Size

6.62 kB

Total Files

5

Last publish

Collaborators

  • black09bb