mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
Update README.md
This commit is contained in:
parent
df01ab86dd
commit
8db6964dc5
10
README.md
10
README.md
@ -84,10 +84,14 @@ const options = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Launch nuxt build with given options
|
// Launch nuxt build with given options
|
||||||
// TODO: you can wrap below inside try/catch to catch any errors.
|
let nuxt = new Nuxt(options)
|
||||||
let nuxt = new Nuxt(options).build();
|
nuxt.build()
|
||||||
|
.then(() => {
|
||||||
// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context)
|
// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context)
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
// An error appended during the build
|
||||||
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user