mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25: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: [],
|
||||
modules: [],
|
||||
layouts: {},
|
||||
serverMiddlewares: [],
|
||||
serverMiddleware: [],
|
||||
ErrorPage: null,
|
||||
cache: false,
|
||||
loading: {
|
||||
|
@ -9,8 +9,8 @@ class Server {
|
||||
// Initialize
|
||||
this.app = connect()
|
||||
this.server = http.createServer(this.app)
|
||||
// Add Middlewares
|
||||
this.nuxt.options.serverMiddlewares.forEach(m => {
|
||||
// Add Middleware
|
||||
this.nuxt.options.serverMiddleware.forEach(m => {
|
||||
if (m instanceof Function) {
|
||||
this.app.use(m)
|
||||
} else if (m && m.path && m.handler) {
|
||||
|
Loading…
Reference in New Issue
Block a user