1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Update ssr-caching example (#4363)

* Remove unnecessary dir key from next's argument
* Add license section to package.json
This commit is contained in:
yhirano55 2018-05-14 07:00:37 +09:00 committed by Tim Neutkens
parent 8512bf49f7
commit 82e77a8838
2 changed files with 3 additions and 2 deletions

View file

@ -12,5 +12,6 @@
"next": "latest", "next": "latest",
"react": "^16.0.0", "react": "^16.0.0",
"react-dom": "^16.0.0" "react-dom": "^16.0.0"
} },
"license": "ISC"
} }

View file

@ -4,7 +4,7 @@ const LRUCache = require('lru-cache')
const port = parseInt(process.env.PORT, 10) || 3000 const port = parseInt(process.env.PORT, 10) || 3000
const dev = process.env.NODE_ENV !== 'production' const dev = process.env.NODE_ENV !== 'production'
const app = next({ dir: '.', dev }) const app = next({ dev })
const handle = app.getRequestHandler() const handle = app.getRequestHandler()
// This is where we cache our rendered HTML pages // This is where we cache our rendered HTML pages