Skip to content

Instantly share code, notes, and snippets.

Last active June 9, 2021 12:56
What would you like to do?
oodler.js - node oodler and visit localhost in browser and lol
//node oodler and visit localhost in browser and lol
var http = require('http')
http.createServer( (req,res) => {
res.writeHead(200, {'contentType' : 'text/html'})
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<script src=''></script>
<body style="background:black;color:white;text-align:center">
<img style="width:200px;height:200px" src="" />
<button style="font-size:200%;padding:20px;" onclick="oodle()">Go</button>
function oodle() {
var name = window.prompt("Enter your name");
name = name.replace(/a|e|i|o|u/gi,"oodle");
document.body.innerHTML += '<h1><span>' + name + '<span onclick="name = this.parentElement.firstChild.textContent;speak(name)"> 🔊</span></h1>';
speak("Hello "+ name);
function speak(name) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment