This is the backend server for the UniForum project developed using the MERN stack.
To view the deployment of the server from this repository, visit: https://uni-forum.herokuapp.com/
To view the UniForum frontend repository, visit: SE701-T5/Frontend
The following are required to run the application
- MongoDB
- Heroku
The following is required to be installed for running the application locally
- Node.js
To run this application, environment variables are required to be set as GitHub repository Action Secrets, and as system variables when run locally.
The following environment variable is required for running the application
PORT = <port>
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
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>
The following instruction can be used to install npm dependencies
npm install
The following instruction can be used to test the application
npm test
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
The following instructions can be used to locally deploy the application to Heroku
heroku create <application-name>
git push heroku main
heroku open
To contribute to this project, refer to the instructions laid out in the Contributing Guidelines and Code of Conduct