Skip to content

Commit

Permalink
randomize port
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Oct 4, 2024
1 parent bfbb7eb commit 38192de
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 38192de

Please sign in to comment.