diff --git a/Gruntfile.js b/Gruntfile.js index f7f7418..53cd298 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -10,8 +10,7 @@ var fs = require('fs'); /** * @TODO - Externalize configuration for server and proxy, mongodb */ -var config = JSON.parse(fs.readFileSync(__dirname + '/config/config.json')); -var cmsRoutes = require(__dirname + '/routes/cms-routes'); + var serverEndpoint = 'http://localhost:8181'; var proxyConfig = { proxy: { @@ -97,6 +96,12 @@ 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); return [ require('json-proxy').initialize(proxyConfig), mountFolder(connect, '.grunt'), diff --git a/karma.conf.js b/karma.conf.js index 832b53a..c36f3b8 100755 --- a/karma.conf.js +++ b/karma.conf.js @@ -27,9 +27,9 @@ module.exports = function (config) { 'app/bower_components/angular-*/dist/angular-*.js', //Libs - 'app/scripts/libs/parse-1.2.17.min.js', - 'app/scripts/libs/md5.js', - 'app/scripts/libs/markdown.js', + 'app/libs/parse-1.2.17.min.js', + 'app/libs/md5.js', + 'app/libs/markdown.js', //Coffee source //'app/scripts/**/*.coffee',