Docs
Backend
Getting Started

Getting Started

Installation

💡

Requires NodeJS version 18.14.0+

💡

Requires npm version 9.3.1+

Install the required packages using the npm package manager.

npm i

Setup

Before running the application, the database URI and JWT secret needs to be defined. These can be configured in the .env file the root directory. Below shows an example configuration to use the local server self-hosted database for development on port 27017 and crowdsor as the secret.

MONGO_URI = mongodb://127.0.0.1:27017/Crowdsor
JWT_SECRET = crowdsor

an optional PORT parameter can be set to modify the default server port.

MONGO_URI = mongodb://127.0.0.1:27017/Crowdsor
JWT_SECRET = crowdsor
PORT = 5000

Running

To run the server locally, run:

npm run server

The application will run on http://localhost:5000 (opens in a new tab) by default. Additionally, the server supports hot reloading using nodemon. To run the server without nodemon, use the standard node command:

npm start