replenishment-services

1.0.1 • Public • Published

server

This hosts the server node.js backend portion of the application. All tests live right next to their corresponding application code. When the file ends in .spec.js it is a unit test. When the file ends in .intspec.js it is an integration test.

Unit tests do not use mongodb. Integration Tests do use Mongodb.

Unit Test Example

scoringService.js - Service which handles how rules are sorted and scored for incoming DTMS requests.

scoringService.spec.js - Unit test which functionally tests the scoring and sorting methods directly.

Integration Test Example

carrierController.js - Controller which handles DTMS carrier requests.

carrierController.intspec.js - End to End test spec which tests carrier controller REST endpoints using request.js and relying on values being present in Mongodb.

Folder Structure

config - All server and environment configurations.

controllers - Every REST route has a corresponding controller which handles that action.

errors - Server wide validation errors.

intspec - Helper functions which are run part of all *.intspec.js API tests.

models - Mongoose.js models which provide ODM support for Mongodb.

policies - Middlware which acts as security checks for every request.

responses - Convenience functions which are attached to Express.js req request object.

seed - Data used to facilitate end to end integration testing with pre populated server values.

services - Middle Tier which interact with the database, and are called by Controllers.

views - EJS views which are the HTML entry points for Angular and templates for email messages.

Files

folderWatcher.js - bootstraps the apptalk folderwatcher process.

server.js - bootstraps the server which manages the frontend angular admin screens and the DTMS disposition REST endpoint.

Package Sidebar

Install

npm i replenishment-services

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

652 kB

Total Files

81

Last publish

Collaborators

  • dalcantara