Created
April 1, 2020 23:18
-
-
Save fredowsley/7b725f0196f48076c438de281c454f6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require('http'); | |
const randexp = require('randexp').randexp; | |
const hostname = '127.0.0.1'; | |
const port = 3000; | |
const server = http.createServer((req, res) => { | |
res.writeHead(200, { | |
'Content-Type': 'text/html' | |
}); | |
res.write(`<html><body><h1>10 Random Zooms!</h1><ul>`); | |
for (let step = 0; step < 10; step++) { | |
var randdata = randexp(/[0-9]{3}-[0-9]{3}-[0-9]{3}/); | |
res.write(`<li><a href="https://zoom.us/j/`+randdata+`">https://zoom.us/j/`+randdata+`</a><br>`); | |
} | |
res.write(`</ul><p><h6><a href="https://gist.github.com/fredowsley">@fredowsley</a></h6></body</html>`); | |
res.end(); | |
}); | |
server.listen(port, hostname, () => { | |
console.log(`Server running at http://${hostname}:${port}/`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment