Last active
March 25, 2020 16:45
-
-
Save fredowsley/1d1bbbade336eb2f97f4273f4406c402 to your computer and use it in GitHub Desktop.
Create random Google Hangout links, find random meetings.
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 Google Hangouts!</h1><ul>`); | |
for (let step = 0; step < 10; step++) { | |
var randdata = randexp(/[a-z]{3}-[a-z]{4}-[a-z]{3}/); | |
res.write(`<li><a href="https://meet.google.com/`+randdata+`">https://meet.google.com/`+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