{"_id":"@adityapurwa/ngrose","_rev":"2-901a0fe25bac5037be854ed270468f59","name":"@adityapurwa/ngrose","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@adityapurwa/ngrose","version":"1.0.0","keywords":["cli","http","server","ngrok","tunnel","expose"],"author":{"name":"Aditya Purwa"},"license":"ISC","_id":"@adityapurwa/ngrose@1.0.0","maintainers":[{"name":"adityapurwa","email":"adityapurwa@windowslive.com"}],"bin":{"ngrose":"index.js"},"dist":{"shasum":"7beb3d3413dba204e036adc7fa10281db14b190a","tarball":"https://registry.npmjs.org/@adityapurwa/ngrose/-/ngrose-1.0.0.tgz","fileCount":3,"integrity":"sha512-/R+DHzUuCXcpr0J5lou0/z9iASx93zfh6wLQwihECKlh/7By9aWG/EFUIqQJX5T3ON21kB3O+zO7FPXxx0e+bA==","signatures":[{"sig":"MEQCIE1aMsb/K3w8lcym6pUA68COVnXco7wphFUcblduAjZwAiB4nn4sJMXduorvwXanLZuleBvg7xgwfDE1ATuDbQIM4g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8022},"main":"index.js","private":false,"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"adityapurwa","email":"adityapurwa@windowslive.com"},"_npmVersion":"10.8.1","description":"CLI tool to serve a directory with HTTP and expose it via ngrok","directories":{},"_nodeVersion":"20.16.0","dependencies":{"ngrok":"^5.0.0-beta.2","fastify":"^4.24.3","fs-extra":"^11.1.1","@fastify/cors":"^8.4.1","@fastify/helmet":"^11.1.1","@fastify/static":"^6.12.0","@fastify/rate-limit":"^8.0.3"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ngrose_1.0.0_1743959977980_0.6644654012445084","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@adityapurwa/ngrose","version":"1.0.1","description":"CLI tool to serve a directory with HTTP and expose it via ngrok","main":"index.js","bin":{"ngrose":"index.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"private":false,"keywords":["cli","http","server","ngrok","tunnel","expose"],"author":{"name":"Aditya Purwa"},"license":"ISC","dependencies":{"fastify":"^4.24.3","@fastify/static":"^6.12.0","@fastify/helmet":"^11.1.1","@fastify/cors":"^8.4.1","@fastify/rate-limit":"^8.0.3","fs-extra":"^11.1.1","ngrok":"^5.0.0-beta.2"},"_id":"@adityapurwa/ngrose@1.0.1","_nodeVersion":"20.16.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-gVh2v9BYgr58qQMYebafnvSgM+lPJUu5yl7LCFY3BrE4FApc6UV0LOnrWxBUFUD4B8ZRYlRC6OPGebrY6lQAjg==","shasum":"94f1aa985e279001459522f1979b9f8e53ee7714","tarball":"https://registry.npmjs.org/@adityapurwa/ngrose/-/ngrose-1.0.1.tgz","fileCount":3,"unpackedSize":8061,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIF+tt5z0armVkUeTSzge/azaCl9JWl+7+Yx/Oxfmt1A1AiBKHBEjjMXP6b+TJtSs0VfcPGJBVB7h6M1wHvIQWpeK3A=="}]},"_npmUser":{"name":"adityapurwa","email":"adityapurwa@windowslive.com"},"directories":{},"maintainers":[{"name":"adityapurwa","email":"adityapurwa@windowslive.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ngrose_1.0.1_1743961359927_0.49634665456817784"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-06T17:19:37.922Z","modified":"2025-04-06T17:42:40.322Z","1.0.0":"2025-04-06T17:19:38.170Z","1.0.1":"2025-04-06T17:42:40.108Z"},"author":{"name":"Aditya Purwa"},"license":"ISC","keywords":["cli","http","server","ngrok","tunnel","expose"],"description":"CLI tool to serve a directory with HTTP and expose it via ngrok","maintainers":[{"name":"adityapurwa","email":"adityapurwa@windowslive.com"}],"readme":"# @adityapurwa/ngrose\n\nA simple CLI tool to serve a directory with HTTP and expose it via ngrok.\n\n## Description\n\nngrose (Ngrok + Expose) is a command-line tool that:\n- Serves the current directory (or a specified directory) using Fastify's static file server\n- Automatically creates an ngrok tunnel to expose your local server to the internet\n- Provides a public URL that can be accessed from anywhere\n\nThis is perfect for:\n- Quickly sharing files with others\n- Testing webhooks without deploying\n- Demonstrating local web applications\n- Temporary file sharing\n\n## Installation\n\nYou can use npx to run it without installation:\n\n```bash\nnpx @adityapurwa/ngrose\n```\n\nOr install it globally:\n\n```bash\nnpm install -g @adityapurwa/ngrose\n```\n\n## Usage\n\n### Serve the current directory\n\n```bash\nnpx @adityapurwa/ngrose\n```\n\n### Serve a specific directory\n\n```bash\nnpx @adityapurwa/ngrose /path/to/directory\n```\n\n### Serve with a specific port\n\n```bash\nPORT=8080 npx @adityapurwa/ngrose\n```\n\n### Enable directory listing (disabled by default for security)\n\n```bash\nnpx @adityapurwa/ngrose --list\n# or\nnpx @adityapurwa/ngrose -l\n```\n\n### Bind to all network interfaces (binds only to localhost by default for security)\n\n```bash\nnpx @adityapurwa/ngrose --public\n# or\nnpx @adityapurwa/ngrose -p\n```\n\n### Show help information\n\n```bash\nnpx @adityapurwa/ngrose --help\n# or\nnpx @adityapurwa/ngrose -h\n```\n\n### Combine options\n\n```bash\nnpx @adityapurwa/ngrose /path/to/directory --list --public\n```\n\n## Features\n\n- 🚀 Quick and easy setup\n- 🔒 Security-focused by default\n- 🛡️ Protection with security headers (Content Security Policy, XSS Protection, etc.)\n- 🚧 Rate limiting to prevent abuse\n- 📂 Optional directory listing (disabled by default)\n- 🌐 Automatic ngrok tunnel creation\n- 🔌 Works on any platform that supports Node.js\n\n## Security Features\n\n- ✅ Binds only to localhost by default (use --public to bind to all interfaces)\n- ✅ Directory listing disabled by default (use --list to enable)\n- ✅ Input validation for directory paths\n- ✅ Security headers with Helmet (Content Security Policy, XSS Protection, etc.)\n- ✅ CORS disabled by default\n- ✅ Rate limiting (100 requests per minute)\n- ✅ Proper error handling\n\n## Security Considerations\n\n- **Public Access**: When using the `--public` flag, your server will be accessible to anyone on your network. Use with caution.\n- **Directory Listing**: Enabling directory listing with `--list` can expose file names that might be sensitive. Use only when necessary.\n- **Sensitive Directories**: Avoid serving directories containing sensitive information.\n- **HTTP vs HTTPS**: The tool uses HTTP, not HTTPS. The ngrok tunnel provides HTTPS, but the local connection is still HTTP.\n- **Rate Limiting**: The default rate limit is 100 requests per minute. This may need adjustment based on your use case.\n\n## Dependencies\n\n- [Fastify](https://www.fastify.io/) - Fast and low overhead web framework\n- [@fastify/static](https://github.com/fastify/fastify-static) - Plugin for serving static files\n- [@fastify/helmet](https://github.com/fastify/fastify-helmet) - Security headers for Fastify\n- [@fastify/cors](https://github.com/fastify/fastify-cors) - CORS support for Fastify\n- [@fastify/rate-limit](https://github.com/fastify/fastify-rate-limit) - Rate limiting for Fastify\n- [fs-extra](https://github.com/jprichardson/node-fs-extra) - Enhanced file system methods\n- [ngrok](https://ngrok.com/) - Secure tunneling service\n\n## License\n\nISC\n\n## Author\n\nAditya Purwa\n","readmeFilename":"README.md"}