Skip to content

Commit 76e8f9f

Browse files
committed
Add executables and custom host and port
1 parent ab777e4 commit 76e8f9f

6 files changed

+3085
-61
lines changed

index-linux

39.8 MB
Binary file not shown.

index-macos

44.3 MB
Binary file not shown.

index-win.exe

32.4 MB
Binary file not shown.

index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const url = require("url");
44
const fs = require("fs");
55
const path = require("path");
66
const port = process.argv[2] || 9000;
7+
const host = process.argv[3] || "localhost";
78

89
http
910
.createServer(function (req, res) {
@@ -86,6 +87,6 @@ http
8687
return res.end();
8788
}
8889
})
89-
.listen(parseInt(port));
90+
.listen(parseInt(port), host);
9091

9192
console.log(`Server listening on port ${port}`);

0 commit comments

Comments
 (0)