Title: Feature: jsserve - npx serve alternative with write support (new repo) · Issue #108 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: Feature: jsserve - npx serve alternative with write support (new repo) · Issue #108 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: Feature: jsserve - npx serve alternative with write support (new repo) · Issue #108 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Summary Create jsserve - a thin wrapper package around JSS that provides a drop-in alternative to npx serve with added REST write capabilities (PUT/DELETE). New repo: github.com/JavaScriptSolidServer/jsserve Difficulty: 20/100 Estimated ...
Open Graph Description: Summary Create jsserve - a thin wrapper package around JSS that provides a drop-in alternative to npx serve with added REST write capabilities (PUT/DELETE). New repo: github.com/JavaScriptSolidServ...
X Description: Summary Create jsserve - a thin wrapper package around JSS that provides a drop-in alternative to npx serve with added REST write capabilities (PUT/DELETE). New repo: github.com/JavaScriptSolidServ...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/108
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Feature: jsserve - npx serve alternative with write support (new repo)","articleBody":"## Summary\n\nCreate `jsserve` - a thin wrapper package around JSS that provides a drop-in alternative to `npx serve` with added REST write capabilities (PUT/DELETE). \n\n**New repo**: `github.com/JavaScriptSolidServer/jsserve`\n\n**Difficulty**: 20/100 \n**Estimated Effort**: 1 day \n**Dependencies**: #107 (`--public` flag)\n\n---\n\n## Motivation\n\n`npx serve` is hugely popular for quick static file serving, but it's **read-only**. Developers often need:\n\n- Quick file upload endpoint for testing\n- Simple WebDAV-like functionality\n- REST API for local development\n- File sync between devices on LAN\n\n`jsserve` fills this gap: **\"serve, but you can write too\"**\n\n---\n\n## Comparison\n\n| Feature | `npx serve` | `npx jsserve` |\n|---------|-------------|---------------|\n| Zero config | ✅ | ✅ |\n| Static file serving | ✅ | ✅ |\n| Directory listings | ✅ | ✅ |\n| CORS | ✅ | ✅ |\n| Custom port | ✅ | ✅ |\n| SPA mode | ✅ | ✅ |\n| **PUT (write files)** | ❌ | ✅ |\n| **DELETE** | ❌ | ✅ |\n| **PATCH** | ❌ | ✅ |\n| **ETags/caching** | ❌ | ✅ |\n| **Conditional requests** | ❌ | ✅ |\n| **Upgrade to Solid** | ❌ | ✅ |\n\n---\n\n## Usage\n\n```bash\n# Install\nnpm i -g jsserve\n\n# Serve current directory (read + write enabled)\njsserve\n\n# Serve specific folder\njsserve ./public\n\n# Custom port\njsserve -p 8080\n\n# Read-only mode (exactly like npx serve)\njsserve --read-only\n\n# With basic auth\njsserve --auth user:pass\n\n# Enable full Solid features\njsserve --solid\n```\n\n### Output\n\n```\n ┌─────────────────────────────────────────┐\n │ │\n │ Serving! │\n │ │\n │ - Local: http://localhost:3000 │\n │ - Network: http://192.168.1.5:3000 │\n │ │\n │ GET/PUT/DELETE enabled │\n │ │\n └─────────────────────────────────────────┘\n```\n\n---\n\n## REST API Examples\n\n```bash\n# Read file\ncurl http://localhost:3000/file.txt\n\n# Write file\ncurl -X PUT -d \"content\" http://localhost:3000/file.txt\n\n# Delete file\ncurl -X DELETE http://localhost:3000/file.txt\n\n# Conditional update (optimistic concurrency)\ncurl -X PUT -H 'If-Match: \"etag\"' -d \"new\" http://localhost:3000/file.txt\n```\n\n---\n\n## Repository Structure\n\n```\ngithub.com/JavaScriptSolidServer/jsserve/\n├── bin/\n│ └── jsserve.js # CLI entry point (~80 LOC)\n├── package.json # Depends on jss\n├── README.md\n└── LICENSE\n```\n\n---\n\n## Implementation\n\nThe wrapper is ~80 LOC that:\n1. Parses serve-compatible CLI args\n2. Translates to JSS flags\n3. Spawns JSS with `--public` flag\n4. Prints a nice banner\n\n```json\n{\n \"name\": \"jsserve\",\n \"bin\": { \"jsserve\": \"./bin/jsserve.js\" },\n \"dependencies\": {\n \"commander\": \"^12.0.0\",\n \"jss\": \"^0.1.0\"\n }\n}\n```\n\n---\n\n## Difficulty Breakdown\n\n| Component | LOC | Difficulty |\n|-----------|-----|------------|\n| CLI wrapper | ~80 | 10/100 |\n| Package setup | ~20 | 5/100 |\n| README/docs | ~100 | 5/100 |\n| **Total** | **~200** | **20/100** |\n\n---\n\n## Related Issues\n\n- #107 - `--public` flag (required dependency)\n- #99 - Docker (jsserve could have its own image)\n- #106 - remoteStorage (jsserve could enable RS mode)","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-01-28T10:08:22Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/108"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:70e750fe-a543-ebfd-a1c6-d0d5a2e45ab4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB34:36D701:81B3:A54C:6B0390EA |
| html-safe-nonce | 6ba24831460dccd1438b38ba2be85c35af3c25f560e6227e4698bf7bef40ca2f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjM0OjM2RDcwMTo4MUIzOkE1NEM6NkIwMzkwRUEiLCJ2aXNpdG9yX2lkIjoiNjQxMzM1NTU5NjA4Njc0MzI3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 002a424930165c20db9efa6d6ade3c5af4470dd2663ade1f53055bb0dcd41c54 |
| hovercard-subject-tag | issue:3864635796 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/108/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0429a99f6b31dc38eccc3310d3ba09d7acf24405b9ca6ec8685dffda2727cace/JavaScriptSolidServer/JavaScriptSolidServer/issues/108 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0429a99f6b31dc38eccc3310d3ba09d7acf24405b9ca6ec8685dffda2727cace/JavaScriptSolidServer/JavaScriptSolidServer/issues/108 |
| og:image:alt | Summary Create jsserve - a thin wrapper package around JSS that provides a drop-in alternative to npx serve with added REST write capabilities (PUT/DELETE). New repo: github.com/JavaScriptSolidServ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width