Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change backend port to 8080 #188

Merged
merged 4 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ cd starter-code-v2
docker-compose up --build
```

The backend runs at http://localhost:5001 (5000 conflicts with airplay on Mac) and the frontend runs at http://localhost:3000. By default, we use GraphQL (with TypeScript backend), REST (with Python backend), MongoDB, with user auth.
The backend runs at http://localhost:8080 and the frontend runs at http://localhost:3000. By default, we use GraphQL (with TypeScript backend), REST (with Python backend), MongoDB, with user auth.


## Creating a Release
Expand Down
2 changes: 1 addition & 1 deletion backend/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ RUN pip install -r requirements.txt

COPY . ./app

EXPOSE 5000
EXPOSE 8080
ENTRYPOINT ["python", "server.py"]
2 changes: 1 addition & 1 deletion backend/python/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
config_name = os.getenv("FLASK_CONFIG") or "development"
app = create_app(config_name)

app.run(host="0.0.0.0", port=int(os.getenv("PORT", 5000)))
app.run(host="0.0.0.0", port=int(os.getenv("PORT", 8080)))
2 changes: 1 addition & 1 deletion backend/typescript/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ RUN yarn install

COPY . ./

EXPOSE 5000
EXPOSE 8080
ENTRYPOINT ["yarn", "dev"]
4 changes: 2 additions & 2 deletions backend/typescript/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
process.env.BACKEND_API_DEFAULT_PER_MINUTE_RATE_LIMIT || "15",
10,
);
const limiter = RateLimit({

Check warning on line 35 in backend/typescript/server.ts

View workflow job for this annotation

GitHub Actions / run-lint

'limiter' is assigned a value but never used
windowMs: 1 * 60 * 1000, // 1 minute
max: defaultMinuteRateLimit,
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
Expand Down Expand Up @@ -81,8 +81,8 @@
}),
});

app.listen({ port: process.env.PORT || 5000 }, () => {
app.listen({ port: process.env.PORT || 8080 }, () => {
/* eslint-disable-next-line no-console */
console.info(`Server is listening on port ${process.env.PORT || 5000}!`);
console.info(`Server is listening on port ${process.env.PORT || 8080}!`);
});
});
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- ./backend/typescript:/app
- /app/node_modules
ports:
- 5001:5000
- 8080
dns:
- 8.8.8.8
depends_on:
Expand All @@ -42,7 +42,7 @@ services:
context: ./backend/python
dockerfile: Dockerfile
ports:
- 5001:5000
- 8080
dns:
- 8.8.8.8
volumes:
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/pages/HooksDemo/HooksDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const HooksDemo = (): React.ReactElement => {
const bannerTimer = setTimeout(() => {
setBannerState({ emoji: bannerState.emoji, showBanner: false });
// Show banner for 5 seconds
}, 5000);
}, 8080);
owen-sellner marked this conversation as resolved.
Show resolved Hide resolved

return (): void => {
// Recall cleanup functions are automatically applied before
Expand Down
Loading