`server.js exports the server constructor which includes:
#####start() Method that starts the server.
#####connect() connects each event to a namespace and room.
#####monitorEvent(event) Takes in an event and pushes it into an array for verifying if it is an allowed event.
Touter.js is pulled in by app.js to route url paths, contains:
#####getNotes(req, res, next) Dynamically handles get routes to the database
#####postNotes(req, res, next) Handles post routes to the database
#####deleteNotes(req, res, next) Handles delete routes to database
Model.js is a generic data-model class that supports the use of mongo schema and provides methods for REST verbs
######post(note) Takes in a note object and passes to schema. Returns modeled data and saves to database
######get(key, value) Creates an object using key and value parameters and uses find() on the database using the object as a query
######delete(key, value) Creates an object using key and value parameters and uses remove() on the database using the object as a query
Extends model.js and exports an instance of a Note class with note-schema as an argument
PORT
- 3333
run nodmone on all client files and the server file.
npm start
- Endpoint:
/q server connected and connecting clinet applications through the publisher and subscriber classes/
Testing has not been implemented at this time.
- How do you run tests?
- What assertions were made?
- What assertions need to be / should be made?