Skip to content

Commit 080e2db

Browse files
committed
Improved README.md with latest changes
1 parent ad2a198 commit 080e2db

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ A template for creating consistent help content:
3636

3737
### Setting Up a New Application
3838

39-
1. **Fork the repository**
39+
1. **Clone the repository**
4040
2. **Customize the HTML template** by replacing placeholders:
4141
- `<!-- APP_TITLE -->` - Your application title
4242
- `<!-- APP_NAME -->` - Your application name (appears in header)
@@ -108,12 +108,41 @@ This template includes a local development server (`server.js`) that provides:
108108
### Starting the Server
109109

110110
```bash
111+
# Local development
111112
npm run start:dev # Vite + API for local development
113+
# Production
112114
npm run build # Create production build in dist/
113115
npm run start:prod # Serve built assets from dist/
114116
```
115117

116-
The server will start on `http://localhost:3000` by default. `start:prod` expects `dist/` to exist (created via `npm run build`).
118+
119+
### Environment Variables
120+
121+
The server supports the following environment variables:
122+
123+
- **`PORT`** - Server port number
124+
- Development: Can be set to any port (e.g., `PORT=3001`), defaulting to `3000`
125+
- Production: Ignored (always `3000` when `IS_PRODUCTION=true`)
126+
127+
- **`IS_PRODUCTION`** - Enables production mode
128+
- Set to `'true'` to enable production mode
129+
- When enabled:
130+
- Server serves static files from `dist/` directory
131+
- Port is forced to `3000`
132+
- Requires `dist/` directory to exist (throws error if missing)
133+
134+
135+
### Vite Build System
136+
137+
This project uses [Vite](https://vitejs.dev/) as the build tool for fast development and optimized production builds.
138+
139+
#### Build Process
140+
141+
Running `npm run build` executes `vite build`, which:
142+
- Reads source files from the `client/` directory (configured in `vite.config.js`)
143+
- Processes and bundles JavaScript, CSS, and other assets
144+
- Outputs optimized production files to the `dist/` directory
145+
- Generates hashed filenames for cache busting
117146

118147
### WebSocket Messaging API
119148

0 commit comments

Comments
 (0)