Skip to content

Commit 852960b

Browse files
committed
fix():[] moving port to 8080
1 parent 00ffd61 commit 852960b

6 files changed

Lines changed: 16 additions & 16 deletions

File tree

.env.example

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
# APPLICATION
99
# ==================================
1010
NODE_ENV=development
11-
PORT=5173
11+
PORT=8080
1212

1313
# Public URL (accessible from client-side)
1414
# Used for: absolute URLs, redirects, social sharing, etc.
1515
# Examples:
16-
# - Development: http://localhost:5173
16+
# - Development: http://localhost:8080
1717
# - Production: https://yourdomain.com
18-
PUBLIC_URL=http://localhost:5173
18+
PUBLIC_URL=http://localhost:8080
1919

2020
# ==================================
2121
# DATABASE
@@ -59,5 +59,5 @@ SESSION_SECRET=your-secret-key-here-change-in-production
5959
# Variables with VITE_ prefix are exposed to the client
6060
# Only use for non-sensitive configuration
6161
# Example:
62-
# VITE_API_BASE_URL=http://localhost:5173
62+
# VITE_API_BASE_URL=http://localhost:8080
6363
# VITE_ENABLE_ANALYTICS=true

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ FROM node:20-alpine AS production
3535
WORKDIR /app
3636

3737
ENV NODE_ENV=production
38-
ENV PORT=5173
38+
ENV PORT=8080
3939

4040
# Add non-root user for security
4141
RUN addgroup --system --gid 1001 remix && \
@@ -49,6 +49,6 @@ COPY --from=build /app/public ./public
4949

5050
USER remix
5151

52-
EXPOSE 5173
52+
EXPOSE 8080
5353

54-
CMD ["npm", "run", "start"]
54+
CMD ["sh", "-c", "PORT=${PORT_IN:-$PORT} npm run start"]

app/lib/env.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export function getRequiredEnv(key: string): string {
3838
export const env = {
3939
// Application
4040
NODE_ENV: getEnv("NODE_ENV") || "development",
41-
PORT: getEnv("PORT") || "5173",
42-
PUBLIC_URL: getEnv("PUBLIC_URL") || "http://localhost:5173",
41+
PORT: getEnv("PORT") || "8080",
42+
PUBLIC_URL: getEnv("PUBLIC_URL") || "http://localhost:8080",
4343

4444
// Database (optional - only needed if using database features)
4545
DATABASE_URL: getEnv("DATABASE_URL"),

docs/ENVIRONMENT_SETUP.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Edit `.env` and set the following:
1616
```env
1717
# Application
1818
NODE_ENV=development
19-
PORT=5173
20-
PUBLIC_URL=http://localhost:5173
19+
PORT=8080
20+
PUBLIC_URL=http://localhost:8080
2121
2222
# Database (PostgreSQL)
2323
DATABASE_URL=postgresql://user:password@localhost:5432/database_name?schema=public
@@ -44,15 +44,15 @@ node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
4444
| Variable | Description | Example |
4545
|----------|-------------|---------|
4646
| `DATABASE_URL` | PostgreSQL connection string | `postgresql://user:pass@localhost:5432/db` |
47-
| `PUBLIC_URL` | Public-facing application URL | `http://localhost:5173` |
47+
| `PUBLIC_URL` | Public-facing application URL | `http://localhost:8080` |
4848
| `SESSION_SECRET` | Secret for session encryption | `random-32-char-string` |
4949

5050
### Optional Variables
5151

5252
| Variable | Description | Example |
5353
|----------|-------------|---------|
5454
| `NODE_ENV` | Environment mode | `development`, `production` |
55-
| `PORT` | Server port | `5173` |
55+
| `PORT` | Server port | `8080` |
5656
| `DIRECT_DATABASE_URL` | Direct DB connection (pooling) | `postgresql://...` |
5757

5858
### Adding API Keys
@@ -82,7 +82,7 @@ AWS_SECRET_ACCESS_KEY=...
8282
### Development
8383
```env
8484
NODE_ENV=development
85-
PUBLIC_URL=http://localhost:5173
85+
PUBLIC_URL=http://localhost:8080
8686
DATABASE_URL=postgresql://postgres:password@localhost:5432/app_dev
8787
```
8888

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"dev": "VITE_CJS_IGNORE_WARNING=true remix vite:dev",
99
"build": "VITE_CJS_IGNORE_WARNING=true remix vite:build",
10-
"start": "PORT=5173 remix-serve ./build/server/index.js",
10+
"start": "remix-serve ./build/server/index.js",
1111
"lint": "eslint .",
1212
"typecheck": "tsc",
1313
"test": "vitest run",

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ declare module "@remix-run/node" {
1111

1212
export default defineConfig({
1313
server: {
14-
port: 5173,
14+
port: 8080,
1515
},
1616
resolve: {
1717
alias: {

0 commit comments

Comments
 (0)