To get a local copy up and running follow these simple steps.
- Clone the repo
git clone https://github.com/iamlookod/fastify-rest-api-typeorm-typescript.git
- Install NPM packages
yarn install
- Make ENV file
cp .env.sample .env
- Run development server
yarn dev
- Generate migration
yarn typeorm migrate:genereate -[FILE_NAME]
- Run migration
yarn typeorm migrate:run
- Revert migration
yarn typeorm migrate:revert
yarn build
yarn start
docker compose up
docker build -t [IMAGE_NAME] .
docker run -p [YOUR_PORT]:[CONTAINER_PORT] -env--file=[PATH_TO_ENV] [IMAGE_NAME]