node-project
βββ package.json
βββ index.js
βββ app
β βββ config
β | βββ config_dev.js or config_prod.js
β βββ controller
β | βββ home.js
β βββ init
β | βββ init.js
β βββ last
β | βββ init.js
β βββ middleware
β | βββ response_time.js
β βββ model
β | βββ xxx.js
| βββ router.js
| βββ error_handler.js (default error handler)
npm run dev attached config_dev.js
npm run prod attached config_dev.js
Place concrete implementation of the restful
You can inject the initialization object into the app