Skip to content

Instantly share code, notes, and snippets.

@ishiduca
Created January 12, 2017 03:19
Show Gist options
  • Save ishiduca/f0d428d596d0c7dc2e693dac7a5a52e8 to your computer and use it in GitHub Desktop.
Save ishiduca/f0d428d596d0c7dc2e693dac7a5a52e8 to your computer and use it in GitHub Desktop.
server side yo-yo yo-yo.js
const yo = require('yo-yo')
const url = require('url')
const http = require('http')
const app = http.createServer((req, res) => {
const q = url.parse(req.url, true).query
res.setHeader('content-type', 'text/html; charset=utf-8')
res.end(String(yo `<body><main><h1>${q.test}</h1></main></body>`))
})
app.listen(9966)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment