Skip to content

iamlookod/fastify-rest-api-typeorm-typescript

Repository files navigation


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]

About

Fastify RestAPI TypeORM Typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published