prepare for production deployment

This commit is contained in:
Adam Brown 2015-04-17 12:59:48 -04:00
parent 98e5b186f1
commit f27d91a803
7 changed files with 12 additions and 22 deletions

View File

@ -591,7 +591,7 @@ module.exports = function (grunt) {
grunt.registerTask('serve', function (target) {
if (target === 'dist') {
return grunt.task.run(['build', 'env:all', 'env:prod', 'express:prod', 'wait', 'open', 'express-keepalive']);
return grunt.task.run(['build', 'env:all', 'env:prod', 'express:prod', 'wait', 'express-keepalive']);
}
if (target === 'debug') {
@ -617,7 +617,6 @@ module.exports = function (grunt) {
'autoprefixer',
'express:dev',
'wait',
'open',
'watch'
]);
});

View File

@ -1,6 +1,6 @@
// nav(ng-include='"components/navbar/navbar.html"')
nav(ng-include='"components/elements/header.html"', onload='title = "wdiff markdown"; ')
nav(ng-include='"components/elements/header.html"', onload='title = "dubdiff"; ')
.container

View File

@ -1,6 +1,6 @@
// nav(ng-include='"components/navbar/navbar.html"')
nav(ng-include='"components/elements/header.html"', onload='title = "wdiff markdown"; subtitle ="results"')
nav(ng-include='"components/elements/header.html"', onload='title = "dubdiff"; subtitle ="results"')
.container
.row

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('markdownFormatWdiffApp')
.controller('NavbarCtrl', function ($scope, $location , /*Auth*/) {
.controller('NavbarCtrl', function ($scope, $location) {
$scope.menu = [{
'title': 'Home',
'link': '/'
@ -9,16 +9,6 @@ angular.module('markdownFormatWdiffApp')
$scope.isCollapsed = true;
/*
$scope.isLoggedIn = Auth.isLoggedIn;
$scope.isAdmin = Auth.isAdmin;
$scope.getCurrentUser = Auth.getCurrentUser;
$scope.logout = function() {
Auth.logout();
$location.path('/login');
};
*/
$scope.isActive = function(route) {
return route === $location.path();

View File

@ -35,7 +35,7 @@ module.exports = function(a, b, asMarkdown, callback) {
if (err)
return callback(err);
//write the string to the file
//write the string to the file
fs.write(fileb.fd, b);
//close the file
@ -45,11 +45,12 @@ module.exports = function(a, b, asMarkdown, callback) {
var cmd = "./bin/wdiff " + filea.path + " " +fileb.path;
exec(cmd, function(err, stdout) {
//console.log(cmd);
//console.log(err);
//console.log(stdout);
if (err && err.code!=1 && err.code!=0) {
return callback(err);
}
//if no difference was found by wdiff, err.code will be 0
var wdiffSame;
wdiffSame = (err && err.code == 0) ? true:false;

View File

@ -5,7 +5,7 @@
module.exports = {
// MongoDB connection options
mongo: {
uri: 'mongodb://localhost/markdownformatwdiff-dev'
uri: 'mongodb://mongodb/markdownformatwdiff-dev'
},
seedDB: false

View File

@ -18,6 +18,6 @@ module.exports = {
uri: process.env.MONGOLAB_URI ||
process.env.MONGOHQ_URL ||
process.env.OPENSHIFT_MONGODB_DB_URL+process.env.OPENSHIFT_APP_NAME ||
'mongodb://localhost/markdownformatwdiff'
'mongodb://mongodb/markdownformatwdiff'
}
};