From 54acd45cd1833a80512a5cfe3d3d731cb79fe710 Mon Sep 17 00:00:00 2001 From: Simon Ho Date: Tue, 2 Dec 2014 15:15:00 -0800 Subject: [PATCH] Update create sample data script to be async --- example/templates/server/boot/create-sample-data.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/templates/server/boot/create-sample-data.js b/example/templates/server/boot/create-sample-data.js index 9e52bb5..d80a631 100644 --- a/example/templates/server/boot/create-sample-data.js +++ b/example/templates/server/boot/create-sample-data.js @@ -1,6 +1,6 @@ var importer = require('../sample-data/import'); -module.exports = function(app) { +module.exports = function(app, done) { if (app.dataSources.db.name !== 'Memory') return; console.error('Started the import of sample data.'); @@ -14,5 +14,6 @@ module.exports = function(app) { console.error('Sample data was imported.'); } app.emit('import done', err); + done(); }); };