The Open Web Framework for nodejs
Technology | Minimum Version Required | Website |
---|---|---|
Nodejs | 6.9.0 | link |
Mongodb | 3.2.0 | link |
Redis (optional) | 3.0 | linux/mac , windows |
Note: If you do not want to use Redis, remove the redis property in config.js
npm install
and Nodemon for development server
npm install -g nodemon
npm start
then visit url localhost:8000
With pm2
pm2 start index
The following points will help you understand the project for further development
Change config.js for database connection and email credentials
Directory | Description |
---|---|
controllers | Functions for routing endpoints |
middlewares | Routing middlewares |
routes | Router in json format |
database/models | DB schema definitions |
database/seeders | Database seeding |
database/providers | DB operations(used by controllers, test-cases) |
services | Application services such as email service |
static | Static contents like css, js, images for client ui |
system | Internal application management modules |
utils | Common utility functions used throughout the application |
views | Html files (with nunjucks) |
test | Mocha Testcases |
Generators are defined in system/generator.js
npm run gen
-
will create model_name.js in database/models directory with name ModelName
npm run gen model model_name
All seeders in database/seeders directory must be enlisted in the allseeders object in database/seeders/index.js so they can be run from npm scripts
npm run seed
npm run seed seeder_name1 seeder_name2