Created
February 11, 2020 02:26
-
-
Save alexcmgit/8c1056b4e8beec4217e405293e9c3cd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index.js | |
if (process.env.DEVELOPMENT) { | |
const ngrok = require("ngrok"); | |
(async function() { | |
try { | |
const url = await ngrok.connect({ | |
proto: "http", | |
addr: process.env.PORT | |
}); | |
console.log("Tunnel Created -> "); | |
console.log(url); | |
console.log("Tunnel Inspector -> http://127.0.0.1:4040"); | |
} catch (error) { | |
console.log(error); | |
} | |
})(); | |
} | |
.env | |
PORT=1111 | |
USER=laks | |
PASS=laks123 | |
DEVELOPMENT=isdev | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment