Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from Dwigoric/Sprint-2
Browse files Browse the repository at this point in the history
Sprint 2
  • Loading branch information
Dwigoric authored Oct 31, 2023
2 parents da9601c + 66a6d53 commit 434056d
Show file tree
Hide file tree
Showing 19 changed files with 2,323 additions and 6,712 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Ignore private files in /private directory except index.html
/private/*
!/private/index.html


### Node template
# Logs
logs
Expand Down
874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.4.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.0.cjs

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: pnp

yarnPath: .yarn/releases/yarn-4.0.0.cjs
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# UnboundMNL - Problem Area #2 (Server)
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](https://yarnpkg.com/getting-started/install)
1. Install Node.js 14+
2. Open a terminal on your user directory.
3. Run `corepack enable`
4. Run `yarn set version stable`

## Environment Variables
Duplicate `.env.example` and rename it to `.env`.
### `PORT`
The port to use for the application, defaults to `3000`.
### `MONGODB_URI`
The MongoDB URI to use for the application, defaults to `mongodb://localhost:27017/unboundmnl-problem-area-2`.
### `JWT_SECRET`
The secret to use for JWT. This is required for the application to run.
If not set, the application will throw an error.
### `FRONTEND_URL`
The URL of the frontend application, defaults to `http://localhost:5173`.
This is used for CORS.

## Private Files
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.

## Optional Development Stuff
### [Prettier](https://prettier.io/) for Code Formatting
You can install the [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) extension (for VSCode).
Other editors have their own extensions as well.
Rules are already set in `.prettierrc.json`.

### [ESLint](https://eslint.org/) for Code Linting
You can install the [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extension (for VSCode).
Other editors have their own extensions as well.
Rules are already set in `.eslintrc.js`.

## Project Setup
```sh
yarn
```

### Start the Server
```sh
yarn start
```
Loading

0 comments on commit 434056d

Please sign in to comment.