From 86778d88856d3f9c8f518ff331923b9b8a3dd023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20B=C3=A4lter?= Date: Mon, 18 Nov 2013 16:10:25 +0100 Subject: [PATCH] test custom configuration --- Gruntfile.js | 31 ++++++++++++++++--------------- tasks/rsimulatorjs.js | 1 + 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 5b6c941..cccc9fc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -35,21 +35,22 @@ module.exports = function(grunt) { } }, custom_options: { - options: { - simulator: { - port: 6001, - rootPath: './mockmock', - useRootRelativePath: false - }, - proxy: { - port : 8001, - pathnameOnly : false, - router : { - '/hoo' : '127.0.0.1:' + 6001, - '' : '127.0.0.1:' + 9001 - } - } - } + options: { + simulator: { + port: 9005, + rootPath: './mocked-rest-api', + useRootRelativePath: true + }, + proxy: { + port: 8001, + router : { + '/public-rest' : '127.0.0.1:' + 9005, + '/secure-rest' : '127.0.0.1:' + 9005, + '/public' : '127.0.0.1:9001', + '' : '127.0.0.1:9001' + } + } + } } }, diff --git a/tasks/rsimulatorjs.js b/tasks/rsimulatorjs.js index 842a385..5e0c7c9 100644 --- a/tasks/rsimulatorjs.js +++ b/tasks/rsimulatorjs.js @@ -40,6 +40,7 @@ module.exports = function(grunt) { } } }; + grunt.verbose.writeln('Grunt-rsimulatorjs options: ', JSON.stringify(options)); rsimulatorjsServer(serverOptions); grunt.log.ok('Started rsimulator on ' + options.simulator.port + ' with proxy on ' + options.proxy.port + ' with the following routes:'); for(route in options.proxy.router) {