Skip to content

Instantly share code, notes, and snippets.

@fredowsley
Created April 1, 2020 23:18
Show Gist options
  • Save fredowsley/7b725f0196f48076c438de281c454f6b to your computer and use it in GitHub Desktop.
Save fredowsley/7b725f0196f48076c438de281c454f6b to your computer and use it in GitHub Desktop.
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