Skip to content

Commit

Permalink
randomize port
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Oct 7, 2024
1 parent d4d6ee6 commit ff90deb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const http = require("http");
const io = require("socket.io");
const opts = { port: 3000 };
const opts = { port: 4000 + Math.floor(Math.random() * 1000) };
const server = http.createServer((req, res) => {});
server.listen(opts.port);
server.close(() => {
Expand Down

0 comments on commit ff90deb

Please sign in to comment.