- Clone the repo and cd into repo -
cd express-ts-docker
- Allow execute permission to installer -
sudo chmod u+x ./app/scripts/setup/install.sh
- Execute the installer -
./app/scripts/setup/install.sh
- Clone the repo and cd into repo -
cd express-ts-docker
- Install package dependencies -
cd app && npm install
- Build docker -
cd .. && COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build
- Start the container -
docker-compose up -d
Endpoint is api/v1/tasks
with standard CRUD operations. Routes can be found in app/src/routes/task.router.ts
.
Endpoint is api/v1/taskLists
with standard CRUD operations and additional routes for adding/removing tasks to/from task lists. Routes can be found in app/src/routes/task.list.router.ts
.
All tests can be run by executing npm run pretest && npm run test
inside app
dir.
Set NODE_ENV
in environemnt file to dev
.
Update app/Dockerfile
at line 13
CMD [ "npm", "run", "start:prod" ]
to
CMD [ "npm", "run", "start:dev" ]
Rebuild and start container
npm run sls:deploy