mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
Middlewares ~> Middleware
https://english.stackexchange.com/questions/257120/middleware-vs-middlewares
This commit is contained in:
parent
8b253712f0
commit
90fc778e81
@ -28,7 +28,7 @@ class Nuxt {
|
|||||||
css: [],
|
css: [],
|
||||||
modules: [],
|
modules: [],
|
||||||
layouts: {},
|
layouts: {},
|
||||||
serverMiddlewares: [],
|
serverMiddleware: [],
|
||||||
ErrorPage: null,
|
ErrorPage: null,
|
||||||
cache: false,
|
cache: false,
|
||||||
loading: {
|
loading: {
|
||||||
|
@ -9,8 +9,8 @@ class Server {
|
|||||||
// Initialize
|
// Initialize
|
||||||
this.app = connect()
|
this.app = connect()
|
||||||
this.server = http.createServer(this.app)
|
this.server = http.createServer(this.app)
|
||||||
// Add Middlewares
|
// Add Middleware
|
||||||
this.nuxt.options.serverMiddlewares.forEach(m => {
|
this.nuxt.options.serverMiddleware.forEach(m => {
|
||||||
if (m instanceof Function) {
|
if (m instanceof Function) {
|
||||||
this.app.use(m)
|
this.app.use(m)
|
||||||
} else if (m && m.path && m.handler) {
|
} else if (m && m.path && m.handler) {
|
||||||
|
Loading…
Reference in New Issue
Block a user