Skip to content

Commit

Permalink
Change default port of backend dev server to 8080 (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
js0mmer authored Dec 10, 2023
1 parent 126884d commit 360c131
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ git checkout -b [branch name]
```
PUBLIC_API_URL=https://api.peterportal.org/rest/v0/
PUBLIC_API_GRAPHQL_URL=https://api.peterportal.org/graphql/
PORT=5000
PORT=8080
```
Note: the port should also match the one set up on the frontend's proxy to the backend under `site/src/setupProxy.js` By default this is 5000.
Note: the port should also match the one set up on the frontend's proxy to the backend under `site/src/setupProxy.js` By default this is 8080.

8. (Optional) Set up your own MongoDB and Google OAuth to be able to test features that require signing in such as leaving reviews or saving roadmaps to your account. Add additional variables/secrets to the .env file from the previous step.
```
Expand All @@ -90,7 +90,7 @@ ADMIN_EMAILS=["<your email>"]

2. In the first terminal window, enter the client directory with `cd site`. Then run the React development server using `npm start`. Ensure the server is running on port 3000 by default.

3. In the second terminal window, enter the API directory with `cd api`. Then run the Express development server using `npm run dev`. Ensure the server is running on port 5000 by default.
3. In the second terminal window, enter the API directory with `cd api`. Then run the Express development server using `npm run dev`. Ensure the server is running on port 8080 by default.

## Our Mission
🎇 Our mission is to improve the UCI student experience with course planning
Expand Down
2 changes: 1 addition & 1 deletion api/.env.local
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PRODUCTION_DOMAIN=http://localhost:5000
PRODUCTION_DOMAIN=http://localhost:8080
2 changes: 1 addition & 1 deletion api/bin/www
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var http = require('http');
* Get port from environment and store in Express.
*/

var port = normalizePort(process.env.PORT || '5000');
var port = normalizePort(process.env.PORT || '8080');
app.set('port', port);

/**
Expand Down
2 changes: 1 addition & 1 deletion site/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function(app) {
app.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:5000',
target: 'http://localhost:8080',
changeOrigin: true,
})
);
Expand Down

0 comments on commit 360c131

Please sign in to comment.