Skip to content

Heroku deployed Node.js backend server developed by Team-5 for the UniForum project associated with the University of Auckland SOFTENG 701 course

License

Notifications You must be signed in to change notification settings

SE701-T5/Backend

Repository files navigation

UniForum Server

This is a Heroku deployed Node.js backend server developed by Team-5 using the MERN stack for the UniForum project associated with the University of Auckland SOFTENG 701 course. To view the deployment of the server from this repository, visit: https://uni-forum.herokuapp.com/

More Information

For more information, visit the repository Wiki

To view the UniForum frontend repository, visit: SE701-T5/Frontend

Requirements

The following are required to run the application

  • MongoDB
  • Heroku

The following is required to be installed for running the application locally

  • Node.js

Environment Variables

To run this application, environment variables are required to be set as GitHub repository Action Secrets, and as system variables when run locally.

Application

The following environment variable is required for running the application

PORT = <port>

Database

The following environment variables are required for connecting the application to a MongoDB account

DATABASE_USER = <database-username>
DATABASE_PW = <database-password>
DATABASE_NAME = <application-database-name>
DATABASE_TEST_NAME = <test-database-name>

It is recommended to use a different test-database-name for repository forks and local testing

Deployment

The following environment variables are required for deploying the application using a Heroku account

HEROKU_EMAIL = <heroku-email>
HEROKU_API_KEY = <heroku-api-key>
HEROKU_APP_NAME = <heroku-application-name>

Local Development

Install

The following instruction can be used to install npm dependencies

npm install

Test

The following instruction can be used to test the application

npm test

Run

The following instruction can be used to run the application

npm start

The application should be running locally at http://localhost:<port>

The following instruction can be used to run the application with automatic restarts for local changes

npm dev

Deploy

The following instructions can be used to locally deploy the application to Heroku

heroku create <application-name>
git push heroku main
heroku open

Contributing

To contribute to this project, refer to the instructions laid out in the Contributing Guidelines and Code of Conduct

Further Reading

Releases

No releases published

Packages

No packages published

Languages