Boilerplate for web application.
Boilerplate web application ready to be used as a base for your project. It contains functionality required for each and every web service API. Contains:
- Web service with basic configuration
- ORM connected to PostgreSQL by default
- Default configuration with user model and API routes for authentication and authorization
- Configured
Docker
file for your service containerization
- Express
- TypeORM
- Passport
- Pg (PostgreSQL)
- Bcryptjs
- Winston
- Swagger
- Configuration for VSCode for
TypeScript
building and debugging in.vscode
folder Eslint
andPrettier
configurationsTypeScript
configuration
Don't forget to add to your VS Code global setting this code in order to activate `fix on save' for linter and prettier:
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.formatOnSave": true
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.formatOnSave": true
}
- Create empty database in PostgreSQL (this will be your app database)
- Run
npm install
for installing all dependencies - Run
npm run gen
and follow cmd - Build app
- Enjoy
npm run docker
Create docker container with api. Container can be started with next command:
docker run --name api -d -p 9000:9000 api:latest
Don't forget to put
--network
and--ip
parameters in case if your postgres container runs in a specific network
npm run text
Updates text transaltions based on scripts/data/texts.ts
file