gib-runs 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,50 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [2.0.0] - 2026-02-08
6
+
7
+ ### Added
8
+ - 🎨 Beautiful modern UI with status indicator in browser
9
+ - 📊 Performance monitoring (request count, reload count, uptime)
10
+ - 🗜️ Built-in gzip compression for better performance
11
+ - 🎪 Auto-reconnection with exponential backoff
12
+ - 🎨 Colored console output with chalk
13
+ - 📈 Statistics display on server shutdown
14
+ - ⚡ Hot CSS injection without full page reload
15
+ - 🔄 Smart file watching with timestamps
16
+ - 🚀 Modern startup banner with detailed information
17
+ - 📱 Better multi-device support display
18
+ - 🎯 Enhanced SPA support
19
+ - 🔌 Improved proxy configuration
20
+ - 📦 Better middleware support
21
+
22
+ ### Changed
23
+ - Renamed from `live-server` to `gib-runs`
24
+ - Updated all dependencies to latest versions
25
+ - Modernized codebase with better error handling
26
+ - Improved logging with icons and colors
27
+ - Enhanced WebSocket connection handling
28
+ - Better file change detection messages
29
+ - Modernized CLI help and version display
30
+
31
+ ### Improved
32
+ - Performance optimizations
33
+ - Better error messages
34
+ - More informative console output
35
+ - Enhanced developer experience
36
+ - Improved documentation
37
+
38
+ ### Technical
39
+ - Upgraded chokidar to v3.5.3
40
+ - Replaced colors with chalk v4.1.2
41
+ - Updated connect to v3.7.0
42
+ - Added compression middleware
43
+ - Modernized all dependencies
44
+ - Better Node.js compatibility (>=12.0.0)
45
+
46
+ ---
47
+
48
+ ## Previous Versions
49
+
50
+ This project is a complete modernization and rebranding of live-server with significant enhancements and new features.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 sofinco (https://github.com/levouinse)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,441 @@
1
+ [![npm version](https://img.shields.io/npm/v/gib-runs.svg)](https://www.npmjs.org/package/gib-runs)
2
+ [![npm downloads](https://img.shields.io/npm/dm/gib-runs.svg)](https://www.npmjs.org/package/gib-runs)
3
+ [![license](https://img.shields.io/npm/l/gib-runs.svg)](https://github.com/levouinse/gib-runs/blob/main/LICENSE)
4
+
5
+ # 🚀 GIB-RUNS
6
+
7
+ **Modern development server with live reload - Unlike some people, this actually runs on merit, not connections.**
8
+
9
+ > *"GIB-RUNS: Because your development server shouldn't need a family dynasty to work properly."*
10
+
11
+ Inspired by the need for something that actually **runs** based on capability, not nepotism. This development server proves that with the right features and hard work, you don't need a famous last name to be successful.
12
+
13
+ ## 🎭 Why "GIB-RUNS"?
14
+
15
+ The name is a playful nod to someone who got a head start in life. But unlike certain political figures, this server:
16
+ - ✅ Actually earned its position through features
17
+ - ✅ Works hard without shortcuts
18
+ - ✅ Doesn't rely on daddy's connections
19
+ - ✅ Serves everyone equally, regardless of background
20
+ - ✅ Transparent about what it does (no hidden agendas)
21
+
22
+ *"When your development server has more integrity than some vice presidents."* 😏
23
+
24
+ ## ✨ Features
25
+
26
+ ### Core Features (Earned, Not Inherited)
27
+ - 🔄 **Live Reload** - Automatic browser refresh on file changes (works without political intervention)
28
+ - ⚡ **Hot CSS Injection** - Update styles without full page reload (no constitutional court needed)
29
+ - 🎨 **Beautiful UI** - Modern status indicator with real-time feedback (actually designed, not just given)
30
+ - 📊 **Performance Monitoring** - Track requests, reloads, and uptime (transparent metrics, unlike some careers)
31
+ - 🗜️ **Compression** - Built-in gzip compression for better performance (optimized through effort, not privilege)
32
+ - 🔒 **HTTPS/HTTP2 Support** - Secure development with modern protocols
33
+ - 🌐 **CORS Support** - Easy cross-origin development (serves everyone equally)
34
+ - 🔐 **HTTP Authentication** - Protect your development server (actual security, not just family name)
35
+ - 🎯 **SPA Support** - Perfect for Single Page Applications
36
+ - 🔌 **Proxy Support** - Proxy API requests during development
37
+ - 📦 **Middleware Support** - Extend functionality with custom middleware
38
+ - 🎭 **Mount Directories** - Serve multiple directories on different routes
39
+
40
+ ### Advanced Features (Built on Competence)
41
+ - 🔍 **Smart File Watching** - Intelligent change detection with debouncing (actually smart, not just called smart)
42
+ - 🎪 **Auto Reconnection** - WebSocket reconnection with exponential backoff
43
+ - 📱 **Multi-Device Support** - Access from any device on your network (meritocracy in action)
44
+ - 🎨 **Colored Logging** - Beautiful, informative console output
45
+ - ⚙️ **Highly Configurable** - Extensive CLI options and config file support
46
+ - 🚦 **Status Indicator** - Visual feedback on connection status
47
+ - 📈 **Statistics** - Detailed metrics on shutdown (real data, not manufactured success stories)
48
+
49
+ ## 📦 Installation
50
+
51
+ ### Global Installation (Recommended)
52
+ ```bash
53
+ npm install -g gib-runs
54
+ ```
55
+
56
+ ### Local Installation
57
+ ```bash
58
+ npm install --save-dev gib-runs
59
+ ```
60
+
61
+ ### From Source
62
+ ```bash
63
+ git clone https://github.com/levouinse/gib-runs.git
64
+ cd gib-runs
65
+ npm install
66
+ npm install -g
67
+ ```
68
+
69
+ ## 🚀 Quick Start
70
+
71
+ Navigate to your project directory and run:
72
+
73
+ ```bash
74
+ gib-runs
75
+ ```
76
+
77
+ That's it! Your project is now being served with live reload enabled.
78
+
79
+ ## 📖 Usage
80
+
81
+ ### Command Line
82
+
83
+ ```bash
84
+ # Serve current directory on default port (8080)
85
+ gib-runs
86
+
87
+ # Serve specific directory
88
+ gib-runs ./dist
89
+
90
+ # Custom port
91
+ gib-runs --port=3000
92
+
93
+ # Open specific path in browser
94
+ gib-runs --open=/dashboard
95
+
96
+ # SPA mode with custom port
97
+ gib-runs --spa --port=8000
98
+
99
+ # HTTPS with custom config
100
+ gib-runs --https=./config/https.conf.js
101
+
102
+ # Multiple options
103
+ gib-runs dist --port=3000 --spa --cors --no-browser
104
+ ```
105
+
106
+ ### CLI Options
107
+
108
+ | Option | Description | Default |
109
+ |--------|-------------|---------|
110
+ | `--port=NUMBER` | Port to use | `8080` |
111
+ | `--host=ADDRESS` | Address to bind to | `0.0.0.0` |
112
+ | `--open=PATH` | Path to open in browser | `/` |
113
+ | `--no-browser` | Suppress browser launch | `false` |
114
+ | `--browser=BROWSER` | Specify browser to use | System default |
115
+ | `-q, --quiet` | Suppress logging | `false` |
116
+ | `-V, --verbose` | Verbose logging | `false` |
117
+ | `--watch=PATH` | Paths to watch (comma-separated) | All files |
118
+ | `--ignore=PATH` | Paths to ignore (comma-separated) | None |
119
+ | `--ignorePattern=RGXP` | Regex pattern to ignore | None |
120
+ | `--no-css-inject` | Reload page on CSS change | `false` |
121
+ | `--entry-file=PATH` | Entry file for SPA | None |
122
+ | `--spa` | Single Page App mode | `false` |
123
+ | `--mount=ROUTE:PATH` | Mount directory to route | None |
124
+ | `--wait=MILLISECONDS` | Debounce reload delay | `100` |
125
+ | `--htpasswd=PATH` | HTTP auth file | None |
126
+ | `--cors` | Enable CORS | `false` |
127
+ | `--https=PATH` | HTTPS config module | None |
128
+ | `--https-module=MODULE` | Custom HTTPS module | `https` |
129
+ | `--proxy=ROUTE:URL` | Proxy requests | None |
130
+ | `--middleware=PATH` | Custom middleware | None |
131
+ | `-v, --version` | Show version | - |
132
+ | `-h, --help` | Show help | - |
133
+
134
+ ### Node.js API
135
+
136
+ ```javascript
137
+ const gibRun = require('gib-runs');
138
+
139
+ const server = gibRun.start({
140
+ port: 8080,
141
+ host: '0.0.0.0',
142
+ root: './public',
143
+ open: true,
144
+ file: 'index.html',
145
+ wait: 100,
146
+ logLevel: 2,
147
+
148
+ // Advanced options
149
+ compression: true,
150
+ cors: true,
151
+ spa: true,
152
+
153
+ // Watch specific paths
154
+ watch: ['./src', './public'],
155
+
156
+ // Ignore patterns
157
+ ignore: ['node_modules', '.git'],
158
+
159
+ // Mount directories
160
+ mount: [
161
+ ['/components', './node_modules'],
162
+ ['/assets', './static']
163
+ ],
164
+
165
+ // Proxy configuration
166
+ proxy: [
167
+ ['/api', 'http://localhost:3000']
168
+ ],
169
+
170
+ // Custom middleware
171
+ middleware: [
172
+ function(req, res, next) {
173
+ console.log('Custom middleware');
174
+ next();
175
+ }
176
+ ]
177
+ });
178
+
179
+ // Shutdown programmatically
180
+ // gibRun.shutdown();
181
+ ```
182
+
183
+ ### Configuration File
184
+
185
+ Create `~/.gib-runs.json` for default settings:
186
+
187
+ ```json
188
+ {
189
+ "port": 8080,
190
+ "host": "0.0.0.0",
191
+ "open": true,
192
+ "logLevel": 2,
193
+ "compression": true,
194
+ "cors": false
195
+ }
196
+ ```
197
+
198
+ ## 🔒 HTTPS Configuration
199
+
200
+ Create an HTTPS configuration module:
201
+
202
+ ```javascript
203
+ // https.conf.js
204
+ const fs = require('fs');
205
+
206
+ module.exports = {
207
+ cert: fs.readFileSync(__dirname + '/server.cert'),
208
+ key: fs.readFileSync(__dirname + '/server.key'),
209
+ passphrase: 'your-passphrase'
210
+ };
211
+ ```
212
+
213
+ Then run:
214
+ ```bash
215
+ gib-runs --https=./https.conf.js
216
+ ```
217
+
218
+ ### HTTP/2 Support
219
+
220
+ Install a custom HTTPS module like `spdy`:
221
+
222
+ ```bash
223
+ npm install spdy
224
+ gib-runs --https=./https.conf.js --https-module=spdy
225
+ ```
226
+
227
+ ## 🎯 Single Page Applications
228
+
229
+ For SPAs (React, Vue, Angular, etc.):
230
+
231
+ ```bash
232
+ # Redirect all routes to index.html
233
+ gib-runs --spa
234
+
235
+ # Or with entry file
236
+ gib-runs --entry-file=index.html
237
+ ```
238
+
239
+ ### SPA Middleware Options
240
+
241
+ - `spa` - Redirects all routes to `/#/route`
242
+ - `spa-ignore-assets` - Like `spa` but ignores requests with file extensions
243
+
244
+ ## 🔌 Proxy Configuration
245
+
246
+ Proxy API requests during development:
247
+
248
+ ```bash
249
+ gib-runs --proxy=/api:http://localhost:3000
250
+ ```
251
+
252
+ Multiple proxies:
253
+ ```bash
254
+ gib-runs --proxy=/api:http://localhost:3000 --proxy=/auth:http://localhost:4000
255
+ ```
256
+
257
+ ## 🎨 Custom Middleware
258
+
259
+ Create custom middleware:
260
+
261
+ ```javascript
262
+ // middleware/custom.js
263
+ module.exports = function(req, res, next) {
264
+ console.log('Request:', req.url);
265
+ next();
266
+ };
267
+ ```
268
+
269
+ Use it:
270
+ ```bash
271
+ gib-runs --middleware=./middleware/custom.js
272
+ ```
273
+
274
+ ## 📊 Status Indicator
275
+
276
+ GIB-RUNS includes a beautiful status indicator that appears in the bottom-right corner of your page:
277
+
278
+ - 🟢 **Green** - Live reload active
279
+ - 🟡 **Yellow** - Reconnecting/Reloading
280
+ - 🔴 **Red** - Disconnected
281
+
282
+ The indicator shows:
283
+ - Connection status
284
+ - CSS update notifications
285
+ - Reload notifications
286
+ - Auto-reconnection attempts
287
+
288
+ ## 🎭 Mount Directories
289
+
290
+ Serve multiple directories:
291
+
292
+ ```bash
293
+ gib-runs --mount=/components:./node_modules --mount=/static:./assets
294
+ ```
295
+
296
+ Access them at:
297
+ - `http://localhost:8080/components/...`
298
+ - `http://localhost:8080/static/...`
299
+
300
+ ## 🔐 HTTP Authentication
301
+
302
+ Protect your development server:
303
+
304
+ ```bash
305
+ # Create htpasswd file
306
+ htpasswd -c .htpasswd username
307
+
308
+ # Use it
309
+ gib-runs --htpasswd=.htpasswd
310
+ ```
311
+
312
+ ## 🌐 Network Access
313
+
314
+ Access your server from other devices:
315
+
316
+ ```bash
317
+ gib-runs --verbose
318
+ ```
319
+
320
+ This will show all network interfaces:
321
+ ```
322
+ 🚀 GIB-RUNS v2.0.0
323
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
324
+ 📁 Root: /home/user/project
325
+ 🌐 Local: http://127.0.0.1:8080
326
+ 🔗 Network:
327
+ http://192.168.1.100:8080
328
+ http://10.0.0.5:8080
329
+ 🔄 Live Reload: Enabled
330
+ 📦 Compression: Enabled
331
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
332
+ ```
333
+
334
+ ## 🐛 Troubleshooting
335
+
336
+ ### No reload on changes
337
+ 1. Check browser console for WebSocket connection
338
+ 2. Ensure files are being watched: `gib-runs --verbose`
339
+ 3. Try increasing wait time: `gib-runs --wait=500`
340
+
341
+ ### Port already in use
342
+ GIB-RUNS will automatically try another port. Or specify one:
343
+ ```bash
344
+ gib-runs --port=3000
345
+ ```
346
+
347
+ ### ENOSPC error (Linux)
348
+ Increase file watchers limit:
349
+ ```bash
350
+ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
351
+ sudo sysctl -p
352
+ ```
353
+
354
+ ### Changes missing or outdated
355
+ Increase debounce time:
356
+ ```bash
357
+ gib-runs --wait=500
358
+ ```
359
+
360
+ ## 🎯 Use Cases
361
+
362
+ ### React Development
363
+ ```bash
364
+ cd my-react-app
365
+ gib-runs build --spa --port=3000
366
+ ```
367
+
368
+ ### Vue.js Development
369
+ ```bash
370
+ cd my-vue-app
371
+ gib-runs dist --spa --cors
372
+ ```
373
+
374
+ ### Static Website
375
+ ```bash
376
+ cd my-website
377
+ gib-runs --open=/index.html
378
+ ```
379
+
380
+ ### API Development with Proxy
381
+ ```bash
382
+ gib-runs public --proxy=/api:http://localhost:3000
383
+ ```
384
+
385
+ ### Multi-Project Setup
386
+ ```bash
387
+ gib-runs --mount=/app1:./project1/dist --mount=/app2:./project2/dist
388
+ ```
389
+
390
+ ## 📈 Performance
391
+
392
+ GIB-RUNS includes several performance optimizations (all achieved through actual work, not family connections):
393
+
394
+ - **Gzip Compression** - Reduces transfer size by up to 70% (real optimization, not just claims)
395
+ - **Smart Caching** - Efficient file serving with proper cache headers
396
+ - **Debounced Reloads** - Prevents reload spam during rapid changes
397
+ - **Efficient File Watching** - Uses native file system events (actually efficient)
398
+ - **Connection Pooling** - Reuses WebSocket connections
399
+
400
+ > *"Unlike some political careers, these optimizations are based on actual technical merit."*
401
+
402
+ ## 🤝 Contributing
403
+
404
+ Contributions are welcome! Please feel free to submit a Pull Request.
405
+
406
+ 1. Fork the repository
407
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
408
+ 3. Commit your changes (`git commit -m 'Add amazing feature'`)
409
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
410
+ 5. Open a Pull Request
411
+
412
+ ## 📝 License
413
+
414
+ MIT License - see [LICENSE](LICENSE) file for details
415
+
416
+ ## 👤 Author
417
+
418
+ **sofinco**
419
+ - GitHub: [@levouinse](https://github.com/levouinse)
420
+ - Repository: [gib-runs](https://github.com/levouinse/gib-runs)
421
+
422
+ ## 🙏 Acknowledgments
423
+
424
+ Built with inspiration from live-server and enhanced with modern features for today's development needs.
425
+
426
+ ## 📚 Related Projects
427
+
428
+ - [connect](https://github.com/senchalabs/connect) - Middleware framework
429
+ - [chokidar](https://github.com/paulmillr/chokidar) - File watching
430
+ - [faye-websocket](https://github.com/faye/faye-websocket-node) - WebSocket support
431
+
432
+ ## 🔗 Links
433
+
434
+ - [npm package](https://www.npmjs.com/package/gib-runs)
435
+ - [GitHub repository](https://github.com/levouinse/gib-runs)
436
+ - [Issue tracker](https://github.com/levouinse/gib-runs/issues)
437
+ - [Changelog](https://github.com/levouinse/gib-runs/releases)
438
+
439
+ ---
440
+
441
+ <p align="center">Made with ❤️ by <a href="https://github.com/levouinse">sofinco</a></p>