diff --git a/Gruntfile.js b/Gruntfile.js
index c8a2464..258d440 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,5 +1,7 @@
/* jshint camelcase:false */
var fs = require('fs');
+var express = require('express');
+var cmsRouter = require('./routes/cms-router.js');
'use strict';
// # Globbing
@@ -11,6 +13,12 @@ var fs = require('fs');
* @TODO - Externalize configuration for server and proxy, mongodb
*/
+var startNodeServer = function(options, app){
+ var app = express();
+ var config = JSON.parse(fs.readFileSync('./config/config.json'));
+ var server = new cmsRouter.mount(config, app);
+};
+
var serverEndpoint = 'http://localhost:8181';
var proxyConfig = {
proxy: {
@@ -59,7 +67,7 @@ module.exports = function (grunt) {
tasks: ['newer:copy:styles', 'autoprefixer']
},
scripts: {
- files: ['<%= yeoman.app %>/scripts/{,**/}*.js'],
+ files: ['<%= yeoman.app %>/scripts/{,** /}*.js'],
tasks: ['jshint:app']
},
gruntfile: {
@@ -95,12 +103,7 @@ module.exports = function (grunt) {
open: true,
base: ['.tmp', '<%= yeoman.app %>'],
middleware: function (connect, options) {
- var express = require('express');
- var fs = require('fs');
- var cmsRouter = require('./routes/cms-router.js');
- var app = express();
- var config = JSON.parse(fs.readFileSync('./config/config.json'));
- var server = new cmsRouter.mount(config, app);
+ startNodeServer(options, connect);
return [
require('json-proxy').initialize(proxyConfig),
mountFolder(connect, '.grunt'),
diff --git a/app/index.html b/app/index.html
index b363b7f..8b547f9 100755
--- a/app/index.html
+++ b/app/index.html
@@ -118,7 +118,8 @@
-
+
+
@@ -138,6 +139,7 @@
+
@@ -145,12 +147,14 @@
+
-
-
-
-
-
+
+
+
+
+
+