Skip to content

Instantly share code, notes, and snippets.

@phyllisstein
Created October 17, 2018 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phyllisstein/adeed841b61b62caf86ddb29faabe11c to your computer and use it in GitHub Desktop.
Save phyllisstein/adeed841b61b62caf86ddb29faabe11c to your computer and use it in GitHub Desktop.
#!/usr/bin/env node
const {
createServer,
IncomingMessage,
ServerResponse,
} = require('unit-http')
require('http').ServerResponse = ServerResponse
require('http').IncomingMessage = IncomingMessage
const express = require('express')
const app = express()
app.get('/', (req, res) => {
res.set('X-Unit-Type', 'Absolute')
res.send('Hello, Unit!')
})
createServer(app).listen()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment