-
Notifications
You must be signed in to change notification settings - Fork 0
Decomposition
-
/server.jsis 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.jscontains all the handlers for specific URLs and HTTP methods. It exports these handler functions so that/server.jscan route requests to them.-
/app/routeAuthorization.jscontains functions that are used in/app/routes.jsto validate API request
-
-
/config/database.jscontains the url of the mongo database that is used throughout the server. -
/app/modelscontains the database models that are used throughout the app -
/push/socket.jscontains all the socket connection handlers and authorization for sockets. This is required by/server.jswhich needs it to start listening for web socket connections, and/app/routes.jswhich needs it to push messages to recipients when thePOST /api/v1/message/API is accessed. -
/speccontains all the tests and crypto generators to be used in the tests.