-
Notifications
You must be signed in to change notification settings - Fork 42
Development Document
Mean Stack Server File
Parameters
-
opts
Object the options passed to create the server -
done
Function the callback function MIT Licensed
self context to be used through out the application
stores the root directory at dir
stores the options pass in to the server
stores the run function incase you need to spin up any other servers
creates the logging throught the entire app
gets & store the current environment
gets & store the current settings based off of the environment
sets the port based on the options or settings
sets up all middleware & placed after db connect to give middleware access
sets up mailer after db connect to give it access
Connect to MongoDb & Register mongoose schemas
setupRegister > Used to gather all modules to gether and to register them properly
setupExpressConfigs > Used to set up expressjs initially, middleware & passport.
setupAuthentication > Used to set up passport authentication & sessions
setupExpressSecurity > Used to set up helmet, hpp, cors & content length.
setupExpressHeaders > Used to set up the headers that go out on every route.
setupExpressLogger > Used to set up our morgan logger & debug statements on all routes.
setupTools > Used to set up every tool in the tools directory.
setupStaticRoutes > Used to set up all system static routes including the main '/*' route with ejs templating.
errorMiddleware > Used to set up our customer error handler in the server folder. NOTE: This goes after routes because we do not want it potentally default to express error handler
maxCDN - _ OPTIONAL _ > Used to purge the max cdn cache of the file. We Support MAXCDN
auto - connectMongoDb : server > Used to finsh the final set up of the server. at the same time we start connecting to mongo and turning on the server.
Mean Stack SocketIO Server File
Parameters
Copyright © Green Pioneer Solutions, LLC 2014 -2017