Skip to content

Commit

Permalink
Add executables and custom host and port
Browse files Browse the repository at this point in the history
  • Loading branch information
Quantalabs committed Mar 27, 2022
1 parent ab777e4 commit 76e8f9f
Show file tree
Hide file tree
Showing 6 changed files with 3,085 additions and 61 deletions.
Binary file added index-linux
Binary file not shown.
Binary file added index-macos
Binary file not shown.
Binary file added index-win.exe
Binary file not shown.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const url = require("url");
const fs = require("fs");
const path = require("path");
const port = process.argv[2] || 9000;
const host = process.argv[3] || "localhost";

http
.createServer(function (req, res) {
Expand Down Expand Up @@ -86,6 +87,6 @@ http
return res.end();
}
})
.listen(parseInt(port));
.listen(parseInt(port), host);

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

0 comments on commit 76e8f9f

Please sign in to comment.