@rip-lang/server 1.3.17 → 1.3.19

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 (3) hide show
  1. package/README.md +45 -45
  2. package/package.json +2 -2
  3. package/server.rip +5 -2
package/README.md CHANGED
@@ -47,16 +47,16 @@ bun add -g rip-lang @rip-lang/server
47
47
 
48
48
  ```bash
49
49
  # From your app directory (uses ./index.rip, watches *.rip)
50
- rip serve
50
+ rip server
51
51
 
52
52
  # Name your app (for mDNS: myapp.local)
53
- rip serve myapp
53
+ rip server myapp
54
54
 
55
55
  # Explicit entry file
56
- rip serve ./app.rip
56
+ rip server ./app.rip
57
57
 
58
58
  # HTTP only mode
59
- rip serve http
59
+ rip server http
60
60
  ```
61
61
 
62
62
  ### Example App
@@ -82,7 +82,7 @@ start()
82
82
  Run it:
83
83
 
84
84
  ```bash
85
- rip serve
85
+ rip server
86
86
  ```
87
87
 
88
88
  Test it:
@@ -760,18 +760,18 @@ start port: 3000
760
760
 
761
761
  ### Entry File Resolution
762
762
 
763
- When you run `rip serve`, it looks for your app's entry file:
763
+ When you run `rip server`, it looks for your app's entry file:
764
764
 
765
765
  ```bash
766
766
  # No arguments: looks for index.rip (or index.ts) in current directory
767
- rip serve
767
+ rip server
768
768
 
769
769
  # Directory path: looks for index.rip (or index.ts) in that directory
770
- rip serve ./myapp/
770
+ rip server ./myapp/
771
771
 
772
772
  # Explicit file: uses that file directly
773
- rip serve ./app.rip
774
- rip serve ./src/server.ts
773
+ rip server ./app.rip
774
+ rip server ./src/server.ts
775
775
  ```
776
776
 
777
777
  ### App Naming
@@ -780,26 +780,26 @@ The **app name** is used for mDNS discovery (e.g., `myapp.local`) and logging. I
780
780
 
781
781
  ```bash
782
782
  # Default: current directory name becomes app name
783
- ~/projects/api$ rip serve # app name = "api"
783
+ ~/projects/api$ rip server # app name = "api"
784
784
 
785
785
  # Explicit name: pass a name that's not a file path
786
- rip serve myapp # app name = "myapp"
786
+ rip server myapp # app name = "myapp"
787
787
 
788
788
  # With aliases: name@alias1,alias2
789
- rip serve myapp@api,backend # accessible at myapp.local, api.local, backend.local
789
+ rip server myapp@api,backend # accessible at myapp.local, api.local, backend.local
790
790
 
791
791
  # Path with alias
792
- rip serve ./app.rip@myapp # explicit file + custom app name
792
+ rip server ./app.rip@myapp # explicit file + custom app name
793
793
  ```
794
794
 
795
795
  **Examples:**
796
796
 
797
797
  ```bash
798
798
  # In ~/projects/api/ with index.rip
799
- rip serve # app = "api", entry = ./index.rip
800
- rip serve myapp # app = "myapp", entry = ./index.rip
801
- rip serve ./server.rip # app = "api", entry = ./server.rip
802
- rip serve ./server.rip@myapp # app = "myapp", entry = ./server.rip
799
+ rip server # app = "api", entry = ./index.rip
800
+ rip server myapp # app = "myapp", entry = ./index.rip
801
+ rip server ./server.rip # app = "api", entry = ./server.rip
802
+ rip server ./server.rip@myapp # app = "myapp", entry = ./server.rip
803
803
  ```
804
804
 
805
805
  ## File Watching
@@ -807,9 +807,9 @@ rip serve ./server.rip@myapp # app = "myapp", entry = ./server.rip
807
807
  Directory watching is **on by default** — any `.rip` file change in your app directory triggers an automatic rolling restart. Use `--watch=<glob>` to customize the pattern, or `--static` to disable watching entirely.
808
808
 
809
809
  ```bash
810
- rip serve # Watches *.rip (default)
811
- rip serve --watch=*.ts # Watch TypeScript files instead
812
- rip serve --static # No watching, no hot reload (production)
810
+ rip server # Watches *.rip (default)
811
+ rip server --watch=*.ts # Watch TypeScript files instead
812
+ rip server --static # No watching, no hot reload (production)
813
813
  ```
814
814
 
815
815
  **How it works:**
@@ -826,8 +826,8 @@ This is a single kernel-level file descriptor in the main process — no polling
826
826
  ### Basic Syntax
827
827
 
828
828
  ```bash
829
- rip serve [flags] [app-path] [app-name]
830
- rip serve [flags] [app-path]@<alias1>,<alias2>,...
829
+ rip server [flags] [app-path] [app-name]
830
+ rip server [flags] [app-path]@<alias1>,<alias2>,...
831
831
  ```
832
832
 
833
833
  ### Flags
@@ -856,36 +856,36 @@ rip serve [flags] [app-path]@<alias1>,<alias2>,...
856
856
  ### Subcommands
857
857
 
858
858
  ```bash
859
- rip serve stop # Stop running server
860
- rip serve list # List registered hosts
859
+ rip server stop # Stop running server
860
+ rip server list # List registered hosts
861
861
  ```
862
862
 
863
863
  ### Examples
864
864
 
865
865
  ```bash
866
866
  # Development (default: watches *.rip, HTTPS, hot reload)
867
- rip serve
867
+ rip server
868
868
 
869
869
  # HTTP only
870
- rip serve http
870
+ rip server http
871
871
 
872
872
  # Production: 8 workers, no hot reload
873
- rip serve --static w:8
873
+ rip server --static w:8
874
874
 
875
875
  # Custom port
876
- rip serve http:3000
876
+ rip server http:3000
877
877
 
878
878
  # With mDNS aliases (accessible as myapp.local and api.local)
879
- rip serve myapp@api
879
+ rip server myapp@api
880
880
 
881
881
  # Watch TypeScript files instead of Rip
882
- rip serve --watch=*.ts
882
+ rip server --watch=*.ts
883
883
 
884
884
  # Debug mode
885
- rip serve --debug
885
+ rip server --debug
886
886
 
887
887
  # Restart workers after 5000 requests or 1 hour
888
- rip serve r:5000,3600s
888
+ rip server r:5000,3600s
889
889
  ```
890
890
 
891
891
  ## Architecture
@@ -967,9 +967,9 @@ The server provides these endpoints automatically:
967
967
  The server ships with a GlobalSign wildcard certificate for `*.ripdev.io`. Combined with DNS (`*.ripdev.io → 127.0.0.1`), every app gets trusted HTTPS automatically:
968
968
 
969
969
  ```bash
970
- rip serve streamline # → https://streamline.ripdev.io (green lock)
971
- rip serve analytics # → https://analytics.ripdev.io (green lock)
972
- rip serve myapp # → https://myapp.ripdev.io (green lock)
970
+ rip server streamline # → https://streamline.ripdev.io (green lock)
971
+ rip server analytics # → https://analytics.ripdev.io (green lock)
972
+ rip server myapp # → https://myapp.ripdev.io (green lock)
973
973
  ```
974
974
 
975
975
  No setup, no flags, no certificate generation. The app name becomes the subdomain.
@@ -979,7 +979,7 @@ No setup, no flags, no certificate generation. The app name becomes the subdomai
979
979
  For production domains or custom setups, provide your own cert/key:
980
980
 
981
981
  ```bash
982
- rip serve --cert=/path/to/cert.pem --key=/path/to/key.pem
982
+ rip server --cert=/path/to/cert.pem --key=/path/to/key.pem
983
983
  ```
984
984
 
985
985
  ## mDNS Service Discovery
@@ -988,10 +988,10 @@ The server automatically advertises itself via mDNS (Bonjour/Zeroconf):
988
988
 
989
989
  ```bash
990
990
  # App accessible at myapp.local
991
- rip serve myapp
991
+ rip server myapp
992
992
 
993
993
  # Multiple aliases
994
- rip serve myapp@api,backend
994
+ rip server myapp@api,backend
995
995
  ```
996
996
 
997
997
  Requires `dns-sd` (available on macOS by default).
@@ -1010,7 +1010,7 @@ get '/', -> 'Hello!'
1010
1010
  start()
1011
1011
  ```
1012
1012
 
1013
- The `start()` function automatically detects when running under `rip serve` and registers the handler.
1013
+ The `start()` function automatically detects when running under `rip server` and registers the handler.
1014
1014
 
1015
1015
  ### Pattern 2: Export fetch function directly
1016
1016
 
@@ -1028,7 +1028,7 @@ export default
1028
1028
 
1029
1029
  ## One-Time Setup
1030
1030
 
1031
- If a `setup.rip` file exists next to your entry file, `rip serve` runs it
1031
+ If a `setup.rip` file exists next to your entry file, `rip server` runs it
1032
1032
  automatically **once** before spawning any workers. This is ideal for database
1033
1033
  migrations, table creation, and seeding.
1034
1034
 
@@ -1078,7 +1078,7 @@ The server includes a built-in dashboard accessible at `http://rip.local/` (when
1078
1078
  - **Registered Hosts** — All mDNS aliases being advertised
1079
1079
  - **Server Ports** — HTTP/HTTPS port configuration
1080
1080
 
1081
- The dashboard uses the same mDNS infrastructure as your app, so it's always available at `rip.local` when any `rip serve` instance is running.
1081
+ The dashboard uses the same mDNS infrastructure as your app, so it's always available at `rip.local` when any `rip server` instance is running.
1082
1082
 
1083
1083
  ## Troubleshooting
1084
1084
 
@@ -1094,7 +1094,7 @@ The dashboard uses the same mDNS infrastructure as your app, so it's always avai
1094
1094
 
1095
1095
  Rip Server works seamlessly with the `serve` middleware for serving
1096
1096
  reactive web applications with hot reload. The `serve` middleware handles
1097
- framework files, page manifests, and SSE hot-reload — `rip serve` adds HTTPS,
1097
+ framework files, page manifests, and SSE hot-reload — `rip server` adds HTTPS,
1098
1098
  mDNS, multi-worker load balancing, and rolling restarts on top.
1099
1099
 
1100
1100
  ### Example: Rip UI App
@@ -1119,7 +1119,7 @@ start()
1119
1119
  Run it:
1120
1120
 
1121
1121
  ```bash
1122
- rip serve
1122
+ rip server
1123
1123
  ```
1124
1124
 
1125
1125
  This gives you:
@@ -1136,7 +1136,7 @@ See [Hot Reloading](#hot-reloading) for details on how the two layers (API + UI)
1136
1136
 
1137
1137
  ## Comparison with Other Servers
1138
1138
 
1139
- | Feature | rip serve | PM2 | Nginx |
1139
+ | Feature | rip server | PM2 | Nginx |
1140
1140
  |---------|-----------|-----|-------|
1141
1141
  | Pure Rip | ✅ | ❌ | ❌ |
1142
1142
  | Single File | ✅ (~1,200 lines) | ❌ | ❌ |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rip-lang/server",
3
- "version": "1.3.17",
3
+ "version": "1.3.19",
4
4
  "description": "Pure Rip web framework and application server",
5
5
  "type": "module",
6
6
  "main": "api.rip",
@@ -45,7 +45,7 @@
45
45
  "author": "Steve Shreeve <steve.shreeve@gmail.com>",
46
46
  "license": "MIT",
47
47
  "dependencies": {
48
- "rip-lang": ">=3.13.33"
48
+ "rip-lang": ">=3.13.35"
49
49
  },
50
50
  "files": [
51
51
  "api.rip",
package/server.rip CHANGED
@@ -339,6 +339,7 @@ parseFlags = (argv) ->
339
339
  hsts: has('--hsts')
340
340
  redirectHttp: not has('--no-redirect-http')
341
341
  reload
342
+ quiet: has('--quiet')
342
343
  socketPrefix
343
344
  maxQueue: coerceInt(getKV('--max-queue='), coerceInt(process.env.RIP_MAX_QUEUE, 512))
344
345
  queueTimeoutMs: coerceInt(getKV('--queue-timeout-ms='), coerceInt(process.env.RIP_QUEUE_TIMEOUT_MS, 30000))
@@ -1017,7 +1018,7 @@ class Server
1017
1018
 
1018
1019
  port = @flags.httpsPort or @flags.httpPort or 80
1019
1020
  protocol = if @flags.httpsPort then 'https' else 'http'
1020
- console.log "rip-server: #{protocol}://#{@flags.appName}.ripdev.io#{formatPort(protocol, port)}"
1021
+ console.log "rip-server: #{protocol}://#{@flags.appName}.ripdev.io#{formatPort(protocol, port)}" unless @flags.quiet
1021
1022
 
1022
1023
  controlFetch: (req) ->
1023
1024
  url = new URL(req.url)
@@ -1139,7 +1140,7 @@ class Server
1139
1140
  stderr: 'ignore'
1140
1141
 
1141
1142
  @mdnsProcesses.set(host, proc)
1142
- console.log "rip-server: #{protocol}://#{host}#{formatPort(protocol, port)}"
1143
+ console.log "rip-server: #{protocol}://#{host}#{formatPort(protocol, port)}" unless @flags.quiet
1143
1144
  catch e
1144
1145
  console.error "rip-server: failed to advertise #{host} via mDNS:", e.message
1145
1146
 
@@ -1174,6 +1175,7 @@ main = ->
1174
1175
  --static Disable hot reload and file watching
1175
1176
  --env=<mode> Set environment (dev, production)
1176
1177
  --debug Enable debug logging
1178
+ --quiet Suppress URL lines (app prints its own)
1177
1179
 
1178
1180
  Network:
1179
1181
  http HTTP only (no TLS)
@@ -1287,6 +1289,7 @@ main = ->
1287
1289
 
1288
1290
  httpOnly = flags.httpsPort is null
1289
1291
  protocol = if httpOnly then 'http' else 'https'
1292
+ process.env.RIP_HTTP_ONLY = '1' if httpOnly
1290
1293
  port = flags.httpsPort or flags.httpPort or 80
1291
1294
  console.log "rip-server: app=#{flags.appName} workers=#{flags.workers} url=#{protocol}://#{flags.appName}.ripdev.io#{formatPort(protocol, port)}/server"
1292
1295