- Add environnement variables
cp .env.example .env
- Update variables in
.env
file - Update JWT_SECRET key in .env
- Install dependencies:
yarn install
- Build TS to JS:
yarn build
- Run migrations:
yarn sequelize-cli db:migrate
- Run seeders:
yarn sequelize-cli db:seed:all
Serve with hot reload at http://localhost:port/ : yarn dev
Api will runing on http://localhost:port/api
Build for production and launch server:
yarn build
yarn start
yarn generate
-
Create image
docker build . -t node-typecript-starter
-
Run container
docker run -p 8000:8000 -d node-typecript-starter
With Docker compose
-
Run the containers
docker compose up -d
-
Stop the containers
docker compose down
-
Rebuild the containers
docker compose build