Travel Bliss API

API for the Travel Bliss project

Prerequisite

  • NodeJS v18
  • Posgres

Getting Started

Clone this repo

git clone https://github.com/ZachHung/TravelBliss-API
cd TravelBliss-API

Install pnpm

npm install -g pnpm

Installing packages

pnpm i

Create a .env file

Create a .env file at the root of the project with this structure:

PORT =
POSTGRES_HOST =
POSTGRES_USER =
POSTGRES_PASS =
POSTGRES_PORT =
POSTGRES_DB =
SECRET_JWT =
JWT_EXPIRED =
SECRET_REFRESH =
REFRESH_EXPIRED =
SALT_ROUND =

Run the migration for the Postgres DB

pnpm migration:run

Running the API

In Dev mode

pnpm start:dev

In Non-dev mode

pnpm build && pnpm start