Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khanhtc1202/api-generator
A API generator performed by node.js using express and mongoose libraries.
https://github.com/khanhtc1202/api-generator
Last synced: 24 days ago
JSON representation
A API generator performed by node.js using express and mongoose libraries.
- Host: GitHub
- URL: https://github.com/khanhtc1202/api-generator
- Owner: khanhtc1202
- Created: 2017-11-08T07:32:58.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-25T14:38:21.000Z (over 6 years ago)
- Last Synced: 2024-10-12T22:28:42.128Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 2.83 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# API generator
## System's features
1. Auto read mongodb's attributes
2. Auto generate CRUD API for colections in mongodb
3. Support RESTFul API to get a complete administration interface## System's struct
```bash
.
├── README.md
├── app
├── config
├── manager
├── template
├── app.js
├── dbtools.js
├── gulpfile.js
└── package.json
```1. `app` => contain controllers, models
2. `config` => contain config files: express, db, routes
3. `manager` => contain administration interface files
4. `template` => template files to generate controllers and models
5. `app.js` => run server
6. `dbtools.js` => seed db from db config file
7. `gulpfile.js` => read db to generate controllers and models file to app folder## How to run
### Require packages
#### For `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### Run system
> Install require packages
```bash
$ npm install
```
> Create and seed db```bash
$ node dbtools
```> Read db and generate controller and model files
```bash
$ gulp gen
```> Run server
```bash
$ npm start
```
or
```bash
$ node app.js
```