项目作者: morzhanov
项目描述 :
Node.js Boilerplate is an project that allows you to start new node.js project from scratch.
高级语言: TypeScript
项目地址: git://github.com/morzhanov/nodejs-express-boilerplate.git
NodeJS ExpressJS Boilerplate

Node.js Boilerplate is an project that allows you to start new node.js project from scratch.
Installation
Use these steps to install project
- npm i
- Create MongoDB databse
- Add MONGODB_URL and MONGODB_TEST_URL to environment variable (optional)
- npm start
Alternatively you can run: “npm run http” on step 4 to run HTTP server.
Usage
This boilerplate contains such folders:
- /src - main sources folder.
- /src/constants - app constants.
- /src/controllers - contain controllers that receives requests from routes, executes business logic via services and returns responses to client.
- /src/db - contain scripts to setup and manage database
- /src/error - custom errors
- /src/middleware - app middlewares
- /src/models - database models (schemas)
- /src/routes - configure here youre app’s routes
- /src/services - services contains logic to manage database, execute requests to other servers, change application behabior, and etc.
/src/index.ts - contain main scripts that configures and run server
/test - contains tests for controllers, services and other parts of application.
NPM Scripts
- start - run node.js server
- test - test server with Mocha
- lint - run eslint check
Main Technologies and libraries
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
Vlad Morzhanov
License
(The MIT License)
Copyright (c) 2018 Vlad Morzhanov.
You can review license in the LICENSE file.