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
In the current iteration, Hapi is used for as a REST API middleware on the NodeJS instance. We are listening on port 8000 accepting rest API calls from the front-end (Ember).
Testing
Testing the server instance in Hapi accomplished via Lab and Code npm packages. Hapi has a server.inject API for simulating HTTP calls to the REST API. By mocking those calls, we test the results of the rest of the server response. Testing is done with a real instance of MongoDB for simplicity, as mocking the database brings many challenges of its own.