Backend repository for NUSAbroad
- Install Node V12 and Docker
- Clone this repository to your directory
- Navigate into the
backend
directory - Run
npm install
- To run server locally, run
npm run dev
- Change rename
.env.example
to.env
, which will be used to set the environment variables - Run
docker-compose up
to build docker image and run docker container for PostgreSQL Database - Hit Ctrl-c to exit
- To remove your container, run
docker compose down
- Make sure your docker container is running, if not set up yet, refer to the above section
- You can use a Database Management tool like PgAdmin or SequelPro to connect to the local PostgreSQL
- Connect to the server with the following settings:
- Database: nusabroad-dev-db
- Host: localhost
- Port: 5432
To update your local database with the latest schemas, run npx sequelize-cli db:migrate
- Install Prettier extension on VSCode
- Set it as your code formatter and set it to format document on save (which will make things easier)
- Code should be auto-formatted on save
- Refer to
nusabroad-backend
under Environments of this repository for the latest deployment status