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) { grunt.registerTask('serve', function (target) {
if (target === 'dist') { 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') { if (target === 'debug') {
@ -617,7 +617,6 @@ module.exports = function (grunt) {
'autoprefixer', 'autoprefixer',
'express:dev', 'express:dev',
'wait', 'wait',
'open',
'watch' 'watch'
]); ]);
}); });

View File

@ -1,6 +1,6 @@
// nav(ng-include='"components/navbar/navbar.html"') // 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 .container

View File

@ -1,6 +1,6 @@
// nav(ng-include='"components/navbar/navbar.html"') // 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 .container
.row .row

View File

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('markdownFormatWdiffApp') angular.module('markdownFormatWdiffApp')
.controller('NavbarCtrl', function ($scope, $location , /*Auth*/) { .controller('NavbarCtrl', function ($scope, $location) {
$scope.menu = [{ $scope.menu = [{
'title': 'Home', 'title': 'Home',
'link': '/' 'link': '/'
@ -9,16 +9,6 @@ angular.module('markdownFormatWdiffApp')
$scope.isCollapsed = true; $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) { $scope.isActive = function(route) {
return route === $location.path(); return route === $location.path();

View File

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

View File

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

View File

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