Last active
August 29, 2015 13:56
-
-
Save psychobunny/9297940 to your computer and use it in GitHub Desktop.
webserver.js middlewares
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async.series({ | |
currentThemeData: function(next) { | |
db.getObjectFields('config', ['theme:type', 'theme:id', 'theme:staticDir', 'theme:templates'], function(err, themeData) { | |
next(err, themeData); | |
}); | |
}, | |
themesData: function(next) { | |
meta.themes.get(function(err, themes) { | |
next(err, themes); | |
}); | |
} | |
}, function(err, data) { | |
middleware(app, data); | |
if (err) { | |
winston.error('Errors were encountered while attempting to initialise NodeBB.'); | |
process.exit(); | |
} else { | |
if (process.env.NODE_ENV === 'development') { | |
winston.info('Middlewares loaded.'); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment