Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

Commit

Permalink
Renames createRequestHandler in getRequestHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
gvergnaud committed Jun 3, 2017
1 parent d6a7f9f commit f9a24bc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ module.exports = router
```js
const express = require('express')
const next = require('next')
const { createRequestHandler } = require('./routes')
const Router = require('./routes')

const app = next({ dev: process.env.NODE_ENV !== 'production' })
const server = express()
const handle = createRequestHandler(app)
const handle = Router.getRequestHandler(app)

app.prepare()
.then(() => {
Expand Down
2 changes: 1 addition & 1 deletion example/express/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Router = require('./routes')
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const server = express()
const handle = Router.createRequestHandler(app)
const handle = Router.getRequestHandler(app)

app.prepare()
.then(() => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nextjs-dynamic-routes",
"version": "2.1.0",
"version": "2.1.1",
"description": "Super simple way to create dynamic routes with url parameters with Next.js",
"main": "dist/index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class Router {
}, {})
}

createRequestHandler = (app) => {
getRequestHandler = (app) => {
const handle = app.getRequestHandler()

return (req, res) => {
Expand Down

0 comments on commit f9a24bc

Please sign in to comment.