Skip to content

A backend API with Node.js, Typescript and Postgres SQL

License

Notifications You must be signed in to change notification settings

DesmondSanctity/rise-backend

Repository files navigation

rise-backend

A backen api built with Node.js, Typescript and Postgres SQL. This app (api) is hosted here.

running the app

running locally

  • Clone this repo
  • Install dependencies: npm install
  • Setup a pg db using any of the client app. I used postgres db provision from Render
  • Setup environment variables: create a .env file with the database url
JWT_SECRET=<your secret JWT key>
JWT_EXPIRES=12h
DB_URL=
PORT=5000
REDIS_URL=<your redis url>
  • If you are using local postgres then your env might look like this
JWT_SECRET=<your secret JWT key>
JWT_EXPIRES=12h
DB_USER=<db user>
DB_HOST=localhost
DB_PASSWORD=<your password>
DB_PORT=5432
PORT=5000/
DB_NAME=<db name>
REDIS_URL=<your redis url>

running on docker

  • Clone this repo
  • Build docker image using docker-compose: docker-compose up The app will be available at http://localhost:5000.

The docker-compose.yml file contains the config to build and run the app using Docker. This allows running the app using Docker without manually building the image.

testing the app

To run tests on Postman, kindly visit the collection using this link

To run the unit test, run this command:

npm run test

About

A backend API with Node.js, Typescript and Postgres SQL

Resources

License

Stars

Watchers

Forks