mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
set build and start npm scripts on all examples (#549)
This commit is contained in:
parent
b0eb0ea353
commit
917a96a1cd
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"scripts": {
|
||||
"dev": "node server.js"
|
||||
"dev": "node server.js",
|
||||
"build": "next build",
|
||||
"start": "NODE_ENV=production node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.14.0",
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
const express = require('express')
|
||||
const next = require('next')
|
||||
|
||||
const app = next({ dir: '.', dev: true })
|
||||
const dev = process.env.NODE_ENV !== 'production'
|
||||
const app = next({ dir: '.', dev })
|
||||
const handle = app.getRequestHandler()
|
||||
|
||||
app.prepare()
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"scripts": {
|
||||
"dev": "node server.js"
|
||||
"dev": "node server.js",
|
||||
"build": "next build",
|
||||
"start": "NODE_ENV=production node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "^2.0.0-beta"
|
||||
|
|
|
@ -2,7 +2,8 @@ const { createServer } = require('http')
|
|||
const { parse } = require('url')
|
||||
const next = require('next')
|
||||
|
||||
const app = next({ dev: true })
|
||||
const dev = process.env.NODE_ENV !== 'production'
|
||||
const app = next({ dev })
|
||||
const handle = app.getRequestHandler()
|
||||
|
||||
app.prepare()
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"scripts": {
|
||||
"dev": "node server.js"
|
||||
"dev": "node server.js",
|
||||
"build": "next build",
|
||||
"start": "NODE_ENV=production node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "^2.0.0-beta",
|
||||
|
|
|
@ -3,7 +3,8 @@ const { parse } = require('url')
|
|||
const next = require('next')
|
||||
const pathMatch = require('path-match')
|
||||
|
||||
const app = next({ dev: true })
|
||||
const dev = process.env.NODE_ENV !== 'production'
|
||||
const app = next({ dev })
|
||||
const handle = app.getRequestHandler()
|
||||
const route = pathMatch()
|
||||
const match = route('/blog/:id')
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"scripts": {
|
||||
"dev": "node server.js"
|
||||
"dev": "node server.js",
|
||||
"build": "next build",
|
||||
"start": "NODE_ENV=production node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.14.0",
|
||||
|
|
|
@ -2,7 +2,8 @@ const express = require('express')
|
|||
const next = require('next')
|
||||
const LRUCache = require('lru-cache')
|
||||
|
||||
const app = next({ dir: '.', dev: true })
|
||||
const dev = process.env.NODE_ENV !== 'production'
|
||||
const app = next({ dir: '.', dev })
|
||||
const handle = app.getRequestHandler()
|
||||
|
||||
// This is where we cache our rendered HTML pages
|
||||
|
|
Loading…
Reference in a new issue