Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tunnel.now

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tunnel.now - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

src/deploy.js

6

package.json
{
"name": "tunnel.now",
"version": "1.0.3",
"version": "1.1.0",
"description": "Forward Zeit.now aliases to your localhost server.",

@@ -10,3 +10,4 @@ "scripts": {

"bin": {
"tunnel.now": "./src/tunnel.js"
"tunnel.now": "./src/tunnel.js",
"tunnel.deploy": "./src/deploy.js"
},

@@ -33,2 +34,3 @@ "repository": {

"cereal-box": "^1.0.0",
"execa": "^0.7.0",
"node-fetch": "^1.7.1",

@@ -35,0 +37,0 @@ "raw-body": "^2.2.0",

@@ -1,1 +0,71 @@

# tunnel.now
# tunnel.now
Zeit's [now](https://zeit.co/now) platform is fantastic for rapid iteration on Node.js projects. However, sometimes - when debugging a webhook, for example - you might want to run the project on your development machine.
You _could_ make changes, deploy, and update aliases as you go. However, this project provides an alternative: it tunnels HTTP requests that are sent to a Zeit domain to your local dev machine.
## Quick start
**Step 1: Install**
```
> npm install -g tunnel.now
/Users/dbustad/.nodenv/versions/8.0.0/bin/tunnel.now -> /Users/dbustad/.nodenv/versions/8.0.0/lib/node_modules/tunnel.now/src/tunnel.js
added 79 packages in 4.609s
```
**Step 2: Update npm links (optional)**
This step is only necessary for users of [nodenv](https://github.com/nodenv/nodenv)
```
> nodenv rehash
```
**Step 3: Deploy your tunnel endpoint**
```
> tunnel.deploy
```
You can also alias directly at this step, like so:
```
> tunnel.deploy my-alias.now.sh
```
Note that this deployment can be re-used however many times you'd like.
**Step 3: Start your application server**
In your project directly, do what you need to do to start your server, and note the port that is opened:
```
> npm run start
Listening on port 8080...
```
**Step 4: In a separate terminal, start your tunnel**
`tunnel.now` takes two arguments:
1. The `now` hostname. This will be either the hostname that `now` provided to you, or the alias that you specified during step 3.
2. The port of your application, running locally.
```
> tunnel.now my-alias.now.sh 8080
Connected to wss://my-alias.now.sh:443.
Tunneling requests to http://localhost:8080...
```
**Step 5: Open your browser!**
Any HTTP requests made to the `now` hostname or alias will be tunneled to your local machine.
## FAQ
**Does this work with other services?** Yes. The only hard requirement is that the host provides HTTP and WebSocket support. However, you will need to deploy the `tunnel.now` repo yourself.
## License
This project is covered under the MIT License. Please see the [LICENSE](./LICENSE) file for more information.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc