aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/index.js b/src/index.js
index 9c1019e..71b70df 100644
--- a/src/index.js
+++ b/src/index.js
@@ -190,6 +190,10 @@ server.route({
}
});
-server.start(function() {
- console.log('Server running!');
-});
+if (!module.parent) {
+ server.start(function() {
+ console.log('Server running!');
+ });
+}
+
+module.exports = server;