This is a customizable starter api application built using NodeJS and ExpressJS.
- Rest API
- Database (postgres) Configurable to desired database
- Logging (pino)
- Tests (Unit, Integration and e2e)
- Docker
- Linting
- Code formatting
- Dependency Inject Architecture
Sample commands are for linux platforms.
Create a .env file in the root directory.
touch .envCopy the variables in the .env.example into the .env file.
cp .env.example .envUse the node version stated in the .nvmrc file.
nvm useYou can use node version manager (nvm) to use multiple node versions on your system. Windows or Linux
Install dependencies
yarn installStart the server in development mode
yarn devStart the server in production mode
Build
yarn buildStart
yarn startCreate a .env.test file in the tests util directory.
touch tests/utils/.env.testCopy the variables in the .env.example into the .env file and fill with test credentials.
cp .env.example tests/utils/.env.testTest
yarn testTest Coverage
yarn test:coverage