This is the server side of the UnboundMNL Problem Area #2. The project presents a simple REST API, exposing endpoints for the client to use. This is built using NodeJS and ExpressJS.
Recommended: Install Yarn Berry
- Install Node.js 14+
- Open a terminal on your user directory.
- Run
corepack enable
- Run
yarn set version stable
Duplicate .env.example
and rename it to .env
.
The port to use for the application, defaults to 3000
.
The MongoDB URI to use for the application, defaults to mongodb://localhost:27017/unboundmnl-problem-area-2
.
The secret to use for JWT. This is required for the application to run. If not set, the application will throw an error.
The comma-separated list of URLs of the frontend application. This is used for CORS. If no value is set, the application will allow all origins.
Put any private files in the private
directory.
This route is protected by .gitignore
and will not be committed to the repository.
Put here the template application form and other private files.
Prettier for Code Formatting
You can install the Prettier - Code formatter extension (for VSCode).
Other editors have their own extensions as well.
Rules are already set in .prettierrc.json
.
ESLint for Code Linting
You can install the ESLint extension (for VSCode).
Other editors have their own extensions as well.
Rules are already set in .eslintrc.js
.
yarn
yarn start
yarn watch