Skip to content

Instantly share code, notes, and snippets.

@daytonmills
Last active September 20, 2017 17:57
Show Gist options
  • Save daytonmills/147c8b93229283d498bd68199490e3de to your computer and use it in GitHub Desktop.
Save daytonmills/147c8b93229283d498bd68199490e3de to your computer and use it in GitHub Desktop.
const http = require("http");
const phrases = require("insult-compliment");
const PORT = 7000,
PORT2 = 7500;
function beNice(request, response) {
response.end(phrases.Compliment());
}
function beRude(request, response) {
response.end(phrases.Insult());
}
var serverNice = http.createServer(beNice).listen(PORT);
var serverRude = http.createServer(beRude).listen(PORT2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment