Skip to content

Instantly share code, notes, and snippets.

@RobertVFrazier
Created November 14, 2017 04:27
Show Gist options
  • Save RobertVFrazier/7b4ae90e950d71ac218d371531c46303 to your computer and use it in GitHub Desktop.
Save RobertVFrazier/7b4ae90e950d71ac218d371531c46303 to your computer and use it in GitHub Desktop.
Mad lib generator - Wade & Robert
'use strict';
const express = require('express');
const app = express();
app.get('/', function (req, res) {
res.json (`There's a ${req.query.adjective1} new ${req.query.name} in ${req.query.place} and everyone's talking. Stunningly ${req.query.adjective2} and ${req.query.adverb} ${req.query.adjective3}, all the cool kids know it. However, ${req.query.name} has a secret - ${req.query.name}'s a vile vampire. Will it end with a bite, or with a stake through the ${req.query.noun}?`
)});
// listen for requests
app.listen(process.env.PORT || 8080, () => console.log(
`Your app is listening on port ${process.env.PORT || 8080}`));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment