Update README.md

This commit is contained in:
Sébastien Chopin 2016-12-08 17:49:47 +01:00 committed by GitHub
parent df01ab86dd
commit 8db6964dc5

View File

@ -84,10 +84,14 @@ const options = {
}
// Launch nuxt build with given options
// TODO: you can wrap below inside try/catch to catch any errors.
let nuxt = new Nuxt(options).build();
let nuxt = new Nuxt(options)
nuxt.build()
.then(() => {
// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context)
})
.catch((e) => {
// An error appended during the build
})
```