Skip to content

Commit

Permalink
Update for Servie 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed May 11, 2018
1 parent 1c8173b commit 82ab821
Show file tree
Hide file tree
Showing 9 changed files with 8,672 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ notifications:
on_failure: change

node_js:
- '4'
- '6'
- stable

after_script: "npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { createHandler } from 'servie-http'
import { get } from 'servie-route'

const handler = createHandler(get('/test', (req) => {
return new Response({ body: 'hello world' }))
return new Response({ statusCode: 200 }))
})

createServer(handler).listen(3000)
Expand Down
3 changes: 2 additions & 1 deletion benchmarks/servie.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const { createServer } = require('http')
const { Response } = require('servie')
const { createBody } = require('servie/dist/body/node')
const route = require('servie-route')
const { createHandler } = require('../dist/index')

const port = 4000

const app = createHandler(route.get('/', () => {
return new Response({ body: 'hello world' })
return new Response({ body: createBody('hello world') })
}))

createServer(app).listen(port, () => console.log('servie running:', port))
Loading

0 comments on commit 82ab821

Please sign in to comment.