⚠️ Please note that a mongodb instance has to run on port 27017. You can start one withdocker run -p 27017:27017 --name mongodb -d mongo:latest
npm i
npm run dev
⚠️ Please note that a mongodb instance has to run on port 27017. You can start one withdocker run -p 27017:27017 --name mongodb -d mongo:latest
npm i
- Change to baseUrl in environment.prod.ts to the url where the backend will be hosted. (default is already set)
npm run build:prod
- Set a
SECRET
environment variable npm run start:backend
npm run start:frontend
- Change to baseUrl in environment.prod.ts to the url where the backend will be hosted. (default is already set)
npm run docker:build
-> docker container- In case you want to run it locally, use
npm run docker:run
- By default, the api will be available at localhost:3333 and the frontend at localhost
- set the backend port with environment variable
PORT
- don't forget to change the baseUrl in environments
You can simply change the port mapping of the docker:run
script. If you want to change the ports inside the container,
use the following steps:
- Set the backend port of the production stage with
ENV PORT {port_here}
inside the Dockerfile - Set the frontend port within the start.sh file with
-l {port_here}
Don't forget toEXPOSE
this port in production stage of the Dockerfile and update in inside thedocker:run
command. - build a new container
This repository contains two apps (backend & frontend) and a shared-library (types).
NestJS is used for the backend and React for the frontend. The database is a mongodb. A Swagger documentation of the API
endpoints and data-types can be found at
{baseUrl}:{port}/api
(default: localhost:3333/api).
Within the docker container, the apps are located at /app/backend
and /app/frontend
. A mongodb instance is running
inside the container and puts its data inside /data/db
. A volume todo_app is provided for it using the docker:run
script.
On a todolist-page you can double-click the name (headline) and edit it. Todo items drag-n-droppable.