Skip to content
Permalink
Browse files

Add example for createHandler

  • Loading branch information...
amio committed Jun 16, 2019
1 parent 0eb65fc commit c50825a5c8ecf616a7c46e287671d8821e163a22
Showing with 11 additions and 0 deletions.
  1. +11 −0 README.md
@@ -32,6 +32,17 @@ Create tinyurl/redirection service with ease.
go(config) // Start server on port 3000
```

- create http handler
```javascript
const http = require('http')
const { createHandler } = require('now-go')
const config = require('./path/to/config.json')
const handler = createHandler(config)
http.createServer(handler).listen(3000)
```

## Example configs

### `go-config.json`

1 comment on commit c50825a

@now

This comment has been minimized.

Copy link

now bot commented on c50825a Jun 16, 2019

Please sign in to comment.
You can’t perform that action at this time.