@rip-lang/server 1.1.3 → 1.1.4

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.
Files changed (2) hide show
  1. package/README.md +57 -1
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -455,6 +455,61 @@ The dashboard uses the same mDNS infrastructure as your app, so it's always avai
455
455
 
456
456
  **Changes not triggering reload**: Make sure you're using `-w` flag for directory watching, or touch your entry file manually.
457
457
 
458
+ ## Serving Rip UI Apps
459
+
460
+ Rip Server works seamlessly with [@rip-lang/ui](../ui/README.md) for serving
461
+ reactive web applications with hot reload. The `ripUI` middleware handles
462
+ framework files, page manifests, and SSE hot-reload — rip-server adds HTTPS,
463
+ mDNS, multi-worker load balancing, and rolling restarts on top.
464
+
465
+ ### Example: Rip UI App
466
+
467
+ Create `index.rip`:
468
+
469
+ ```coffee
470
+ import { get, use, start, notFound } from '@rip-lang/api'
471
+ import { ripUI } from '@rip-lang/ui/serve'
472
+
473
+ dir = import.meta.dir
474
+
475
+ use ripUI pages: "#{dir}/pages", watch: true
476
+
477
+ get '/css/*', -> @send "#{dir}/css/#{@req.path.slice(5)}"
478
+
479
+ notFound -> @send "#{dir}/index.html", 'text/html; charset=UTF-8'
480
+
481
+ start()
482
+ ```
483
+
484
+ Run it:
485
+
486
+ ```bash
487
+ rip-server -w
488
+ ```
489
+
490
+ This gives you:
491
+
492
+ - **Framework files** served from `/rip-ui/*` (compiler, UI modules)
493
+ - **Page manifest** auto-generated at `/rip-ui/manifest.json`
494
+ - **Hot reload** via SSE at `/rip-ui/watch` — save a `.rip` file and the browser
495
+ updates instantly
496
+ - **HTTPS + mDNS** — access at `https://myapp.local`
497
+ - **Multi-worker** — load balanced across CPU cores
498
+ - **Rolling restarts** — zero-downtime file-watch reloading
499
+
500
+ ### How Hot Reload Works with rip-server
501
+
502
+ When running with `-w`, two layers of hot reload work together:
503
+
504
+ 1. **rip-server file watching** (`-w` flag) — watches for `.rip` file changes
505
+ and triggers rolling worker restarts (server-side reload)
506
+ 2. **ripUI SSE watching** (`watch: true`) — watches the pages directory and
507
+ notifies connected browsers via SSE (client-side reload)
508
+
509
+ For development, the SSE hot-reload is usually sufficient — it recompiles
510
+ components in the browser without restarting workers. The `-w` flag is useful
511
+ when server-side code changes (routes, middleware, etc.).
512
+
458
513
  ## Comparison with Other Servers
459
514
 
460
515
  | Feature | rip-server | PM2 | Nginx |
@@ -486,5 +541,6 @@ MIT
486
541
  ## Links
487
542
 
488
543
  - [Rip Language](https://github.com/shreeve/rip-lang)
489
- - [@rip-lang/api](../api/README.md)
544
+ - [@rip-lang/api](../api/README.md) — API framework (routing, middleware, `@send`)
545
+ - [@rip-lang/ui](../ui/README.md) — Zero-build reactive web framework
490
546
  - [Report Issues](https://github.com/shreeve/rip-lang/issues)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rip-lang/server",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Pure Rip application server — multi-worker, hot reload, HTTPS, mDNS",
5
5
  "type": "module",
6
6
  "main": "server.rip",
@@ -38,8 +38,8 @@
38
38
  "author": "Steve Shreeve <steve.shreeve@gmail.com>",
39
39
  "license": "MIT",
40
40
  "dependencies": {
41
- "rip-lang": "^3.0.2",
42
- "@rip-lang/api": "^1.1.2"
41
+ "rip-lang": "^3.4.4",
42
+ "@rip-lang/api": "^1.1.4"
43
43
  },
44
44
  "files": [
45
45
  "bin/",