Skip to content

Latest commit

 

History

History
67 lines (58 loc) · 1.11 KB

README.md

File metadata and controls

67 lines (58 loc) · 1.11 KB

Fastify rest api TypeORM Typescript

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Installation

  1. Clone the repo
    git clone https://github.com/iamlookod/fastify-rest-api-typeorm-typescript.git
  2. Install NPM packages
    yarn install
  3. Make ENV file
 cp .env.sample .env
  1. Run development server
 yarn dev

DB Migration

  1. Generate migration
 yarn typeorm migrate:genereate -[FILE_NAME]
  1. Run migration
 yarn typeorm migrate:run
  1. Revert migration
 yarn typeorm migrate:revert

Build

 yarn build

Start production

 yarn start

Start Docker compose

 docker compose up

Start Docker

 docker build -t [IMAGE_NAME] .
 docker run -p [YOUR_PORT]:[CONTAINER_PORT] -env--file=[PATH_TO_ENV] [IMAGE_NAME]