Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

514 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatBTC

Node API for BTC Transcript Review

Setup for Development

Prerequisites

  • Docker
  • Ensure ports 8080, 5433 and 5432 are open and accept connections (to access the backend api)
  • Ensure port 3000 is open to accept connections (to access the frontend client)

Steps to set up

  • Clone the repository

Setup Database

  • The best way to get a database for development is to use docker

  • Navigate to the api directory cd api

  • Run make start-deps to start the container

  • optional Run make start-pg-shell to access the postgres shell or

  • Download any database console or explorer to access the database data. We recommend dbeaver

  • To stop the running containers and server, run make stop-deps

  • Run make reset-deps to restart all containers.

Setup API

  • Navigate to api directory cd api
  • Create a new .env file and copy the contents of .env.example into it or run cp .env.example .env
  • In api directory run yarn install to install all dependencies
  • API calls are processed through a middleware. You can generate a jwt secret locally and replace JWT_SECRET in your .env file

(e.g. const secret = require('crypto').randomBytes(64).toString('hex'))

  • Run make init to initialize and start the api service. This will run migrations, seed the database and start the server.

  • You only need run make init the first time. Subsequent run only requires make run or yarn dev

API docs endpoints to check out

  • Access the endpoints documentation here: http://localhost:8080/api/docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages