-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c8173b
commit 82ab821
Showing
9 changed files
with
8,672 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
Oops, something went wrong.