API generator
System's features
- Auto read mongodb's attributes
- Auto generate CRUD API for colections in mongodb
- Support RESTFul API to get a complete administration interface
System's struct
.
├── README.md
├── app
├── config
├── manager
├── template
├── app.js
├── dbtools.js
├── gulpfile.js
└── package.json
app
=> contain controllers, modelsconfig
=> contain config files: express, db, routesmanager
=> contain administration interface filestemplate
=> template files to generate controllers and modelsapp.js
=> run serverdbtools.js
=> seed db from db config filegulpfile.js
=> read db to generate controllers and models file to app folder
How to run
Require packages
gulp
to generate file
For mongodb
to connect to mongodb
For mongoose
to create model
For ng-admin
Support RESTFul API to get a complete administration interface
For Run system
Install require packages
$ npm install
Create and seed db
$ node dbtools
Read db and generate controller and model files
$ gulp gen
Run server
$ npm start
or
$ node app.js