github.com/hhsnopek/up@v0.1.1/handler/testdata/node/server (about)

     1  #!/usr/bin/env node
     2  
     3  const http = require('http')
     4  const port = ~~process.env.PORT
     5  
     6  http.createServer((req, res) => {
     7    res.setHeader('X-Foo', 'bar')
     8    res.setHeader('Content-Type', 'text/plain; charset=utf-8')
     9    res.end('Hello World')
    10  }).listen(port, '127.0.0.1', _ => {
    11    console.log('listening')
    12  })