From 8c592ec3aecab8e789098ab15e7c3599c460ca9d Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 8 Dec 2016 20:04:51 +0330 Subject: [PATCH] Use `nuxt.build()` instead of promises --- README.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3e67348de7..0c875baadb 100644 --- a/README.md +++ b/README.md @@ -84,13 +84,10 @@ const options = { } // Launch nuxt build with given options -new Nuxt(options) -.then((nuxt) => { - // You can use nuxt.render(req, res) or nuxt.renderRoute(route, context) -}) -.catch((error) { - // If an error appended while building the project -}) +// TODO: you can wrap below inside try/catch to catch any errors. +let nuxt = new Nuxt(options).build(); +// You can use nuxt.render(req, res) or nuxt.renderRoute(route, context) + ```