prepare for production deployment
This commit is contained in:
parent
98e5b186f1
commit
f27d91a803
@ -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'
|
||||
]);
|
||||
});
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
@ -246,4 +247,4 @@ function rewriteWdiffMarkdown(source) {
|
||||
});
|
||||
return output;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
module.exports = {
|
||||
// MongoDB connection options
|
||||
mongo: {
|
||||
uri: 'mongodb://localhost/markdownformatwdiff-dev'
|
||||
uri: 'mongodb://mongodb/markdownformatwdiff-dev'
|
||||
},
|
||||
|
||||
seedDB: false
|
||||
|
@ -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'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user