Created
November 14, 2017 04:27
-
-
Save RobertVFrazier/7b4ae90e950d71ac218d371531c46303 to your computer and use it in GitHub Desktop.
Mad lib generator - Wade & Robert
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
'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