Skip to content

Commit

Permalink
Update backend dependencies, changed port to 3000 and readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
stasel committed Apr 25, 2024
1 parent 08e3181 commit 4e5f595
Show file tree
Hide file tree
Showing 21 changed files with 16,531 additions and 19,094 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
env:
# Server environment variables
PORT: 5000
PORT: 3000
MONGODB_URL: ${{ secrets.CYPRESS_MONGODB_URL }}
# Client environment variables
BASE_SERVER_URL: http://localhost:5000
BASE_SERVER_URL: http://localhost:3000

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ To start developing, make sure you have created the `.env` files and did the set

The client will be built using `webpack`. The configuration for that is in the `webpack.config.js` file. When running in production the command `npm run build` will be run which will create a `dist` folder with the compiled version of the code. When running in dev mode the `webpack-dev-server` will build it in memory. This will also automatically rebuild on file changes!

Our client will always run on `https://localhost:8080`. So if it does not automatically open your browser you can go to that URL. It will connect to the URL put in the `.env` file, defaulting to `https://localhost:5000`.
Our client will always run on `https://localhost:8080`. So if it does not automatically open your browser you can go to that URL. It will connect to the URL put in the `.env` file, defaulting to `https://localhost:3000`.

You will also notice that to connect to the server our `useFetch` hook adds `/api` to the url. This is because on `heroku` our backend not only has its own routes but also hosts the client code. This way it allows us to differentiate between what needs to return the client code and what is an actual request to our backend.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
`TODO: Add a nice screenshot of the app!`

# Class XX final project
# Cohort XX final project

This is the final project for the HackYourFuture curriculum we did as a class using the MERN stack by following the agile methodology with our team and a group of mentors. A quick guide to what we built:
This is the final project for the HackYourFuture curriculum we did as a cohort using the [MERN stack](https://www.mongodb.com/resources/languages/mern-stack) by following the agile methodology with our team and a group of mentors. A quick guide to what we built:

> TODO: Add short description of the app
Expand Down
2 changes: 1 addition & 1 deletion client/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# If you add variables here, then don't forget to also add it to the webpack.config file so it gets loaded

# The URL that the frontend will use to connect to the backend
BASE_SERVER_URL=http://localhost:5000
BASE_SERVER_URL=http://localhost:3000
10,052 changes: 5,795 additions & 4,257 deletions client/package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"eslint-plugin-react-hooks": "^4.3.0",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.5.0",
"jest": "^27.3.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-fetch-mock": "^3.0.3",
"prettier": "^2.4.1",
"prettier-eslint": "^13.0.0",
Expand All @@ -57,4 +58,4 @@
"react-dom": "^17.0.2",
"react-router-dom": "^6.0.2"
}
}
}
2 changes: 1 addition & 1 deletion cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const axios = require("axios");
/**
* @type {Cypress.PluginConfig}
*/
const baseUrl = "http://localhost:5000";
const baseUrl = "http://localhost:3000";

// eslint-disable-next-line no-unused-vars
module.exports = (on, config) => {
Expand Down
Loading

0 comments on commit 4e5f595

Please sign in to comment.