Spaces:
Runtime error
Runtime error
Commit
·
db5dc1b
1
Parent(s):
e3323ac
Update app.js
Browse files
app.js
CHANGED
@@ -11,6 +11,17 @@ const server = http.createServer((req, res) => {
|
|
11 |
res.end('Hello World');
|
12 |
});
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
server.listen(port, hostname, () => {
|
15 |
console.log(`Server running at http://${hostname}:${port}/`);
|
16 |
|
@@ -23,7 +34,7 @@ server.listen(port, hostname, () => {
|
|
23 |
}
|
24 |
})
|
25 |
|
26 |
-
|
27 |
token = process.env.AUTHTOKEN;
|
28 |
console.log(token);
|
29 |
const url = ngrok.connect({
|
@@ -31,5 +42,5 @@ server.listen(port, hostname, () => {
|
|
31 |
authtoken: token
|
32 |
}).then(url => { return url } );
|
33 |
console.log(url);
|
34 |
-
|
35 |
});
|
|
|
11 |
res.end('Hello World');
|
12 |
});
|
13 |
|
14 |
+
|
15 |
+
token = process.env.AUTHTOKEN;
|
16 |
+
(async function() {
|
17 |
+
const url = ngrok.connect({
|
18 |
+
addr: 7680,
|
19 |
+
authtoken: token
|
20 |
+
});
|
21 |
+
console.log(url);
|
22 |
+
})();
|
23 |
+
|
24 |
+
|
25 |
server.listen(port, hostname, () => {
|
26 |
console.log(`Server running at http://${hostname}:${port}/`);
|
27 |
|
|
|
34 |
}
|
35 |
})
|
36 |
|
37 |
+
/*
|
38 |
token = process.env.AUTHTOKEN;
|
39 |
console.log(token);
|
40 |
const url = ngrok.connect({
|
|
|
42 |
authtoken: token
|
43 |
}).then(url => { return url } );
|
44 |
console.log(url);
|
45 |
+
*/
|
46 |
});
|