Skip to content

v0.15.0

Compare
Choose a tag to compare
@adamhalasz adamhalasz released this 05 Mar 22:54
· 2 commits to master since this release

Introducing app.host(location) to allow handling hostnames and
ports without creating a new server instance. It's useful when the
hostname and port is changed by a proxy server. #73

Now can you do:

app.host('yourdomain.com')

For example to make diet work on Heroku:

const server = require('diet')
const app = server()

app.get('/', function($){
    $.end('Hello Heroku from Diet!')
})

app.listen(process.env.PORT || 5000)
app.host('YOUR_APP_ID.herokuapp.com')