cs-manager

8.0.12 • Public • Published

CS Manager

Backend in charge of handling API calls, GQL, and ACL logic related to CS. General flow of request is received from Gateway or directly from service (i.e. portal). There will be ACL middleware checks and if user has proper access on said charge station and action, the action will be carried out.

Dependencies

  • CS manager is not a standalone service and depends on different tables and services.

  • ACL Service - Used for middleware of user privileges

  • CS Database - Holds information for

  • Kafka - Messaging service used for issuing out requests

  • Consul - DNS, Service finder of some sort.

  • Depending on the testing you are doing you will you need other services. Gateway, consul, etcd, etc.

Building & Running

npm install

npm start

  • Chances are low this will work out of the box. The is a useless bullet look below.
  • If you come across issues during install they may be related to node version. You can use nvm to get around this. nvm use 10 or to set as default nvm alias default 10 and node -v to confirm.
  • You need to have the replica set populated properly (I think). You need to follow the steps below to run the DB locally and run npm test to properly set up the replica set.
  • If you do not have config/local.coffee copy config/local.coffee.sample and rename.

Setting up dependencies

To simulate the environment on its own you need to set up the dependencies in Docker or to build and run dependencies from source.

  • To run ACL Service in Docker: ./path/to/script.sh

  • To run Kafka in docker: ./path/to/script.sh

  • For the Database, you will need to create a local instance and copy over database to local with a replica set. If you have mongo running already in Docker stop it firstly. Getting Mongo with replica set ./trust/the/script.sh. Run npm test to properly set up rs0. Staging data can be connected to staging-master:30106 and you will need to copy over the collections you need to local. If collections are named staging-xxx change to development-xxx. Best to ask which collections are actually needed for work you will be doing to not copy over unnecessary collections (e.g. user/express logs).

Readme

Keywords

none

Package Sidebar

Install

npm i cs-manager

Weekly Downloads

2

Version

8.0.12

License

none

Unpacked Size

187 kB

Total Files

71

Last publish

Collaborators

  • tn-group