Skip to content

Commit 82a9d1e

Browse files
committed
Changes export
1 parent bac94a2 commit 82a9d1e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm install zeit-node-server
1818
### Example Jest Test
1919

2020
```javascript
21-
import createServer from 'zeit-now-node-server';
21+
import { createServer } from 'zeit-now-node-server';
2222
import listen from 'test-listen';
2323
import axios from 'axios';
2424
import routeUnderTest from './api/hello-world';

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function getCookieParser(req: IncomingMessage) {
7878
};
7979
}
8080

81-
const nowNodeServer = (
81+
export const createServer = (
8282
route: (req: NowRequest, res: NowResponse) => any | Promise<any>
8383
) =>
8484
micro(async (req: IncomingMessage, res: ServerResponse) => {
@@ -112,5 +112,3 @@ const nowNodeServer = (
112112
});
113113
return await route(nowReq, nowRes);
114114
});
115-
116-
export default nowNodeServer;

0 commit comments

Comments
 (0)