You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
David Stanley edited this page Dec 7, 2015
·
2 revisions
Modules
/server.js is the entry point of the code. It loads dependencies, configures the server and its settings, and makes the server begin listening at a port that is determined by the NODE_ENV variable.
/app/routes.js contains all the handlers for specific URLs and HTTP methods. It exports these handler functions so that /server.js can route requests to them.
/app/routeAuthorization.js contains functions that are used in /app/routes.js to validate API request
/config/database.js contains the url of the mongo database that is used throughout the server.
/app/models contains the database models that are used throughout the app
/push/socket.js contains all the socket connection handlers and authorization for sockets. This is required by /server.js which needs it to start listening for web socket connections, and /app/routes.js which needs it to push messages to recipients when the POST /api/v1/message/ API is accessed.
/spec contains all the tests and crypto generators to be used in the tests.