Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Commit

Permalink
Revert "Node update"
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher DeCairos authored May 16, 2018
1 parent f2cc92e commit 6cacee0
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 7,212 deletions.
4 changes: 1 addition & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ module.exports = function (grunt) {
var jscsrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jscsrc");
var jshintrc = grunt.file.readJSON("node_modules/mofo-style/linters/.jshintrc");

jshintrc.esversion = 6;

var javaScriptFiles = [
"Gruntfile.js",
"app.js",
Expand Down Expand Up @@ -51,6 +49,6 @@ module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-jscs");

grunt.registerTask("clean", ["jsbeautifier:modify"]);
grunt.registerTask("validate", ["jshint", "jscs"]);
grunt.registerTask("validate", ["jsbeautifier:verify", "jshint", "jscs"]);
grunt.registerTask("default", ["validate"]);
};
15 changes: 7 additions & 8 deletions app/db/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var Sequelize = require('sequelize');

module.exports = function (env, callback) {
module.exports = function (env) {
var sequelize;
var health = {
connected: false,
Expand All @@ -21,15 +21,14 @@ module.exports = function (env, callback) {
var modelControllers = require('./models')(sequelize, env);

// Sync
sequelize.sync()
.then(() => {
sequelize.sync().complete(function (err) {
if (err) {
handlers.dbErrorHandling(err, handlers.forkErrorHandling);
} else {
health.connected = true;
handlers.forkSuccessHandling();
if (callback) {
callback();
}
})
.catch(err => handlers.dbErrorHandling(err, handlers.forkErrorHandling));
}
});

// Export models
return {
Expand Down
Loading

0 comments on commit 6cacee0

Please sign in to comment.