mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
refactor into components
This commit is contained in:
parent
d3f66e132e
commit
13a4e71a83
@ -11,14 +11,14 @@ class Server {
|
|||||||
this.app = connect()
|
this.app = connect()
|
||||||
this.server = http.createServer(this.app)
|
this.server = http.createServer(this.app)
|
||||||
this.nuxt.ready()
|
this.nuxt.ready()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// Add Middleware
|
// Add Middleware
|
||||||
this.nuxt.options.serverMiddleware.forEach(m => {
|
this.options.serverMiddleware.forEach(m => {
|
||||||
this.useMiddleware(m)
|
this.useMiddleware(m)
|
||||||
|
})
|
||||||
|
// Add default render middleware
|
||||||
|
this.useMiddleware(this.render.bind(this))
|
||||||
})
|
})
|
||||||
// Add default render middleware
|
|
||||||
this.useMiddleware(this.render.bind(this))
|
|
||||||
})
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user