policy-service v1.0.0
CI/CD pipelines
Policy Service
Welcome to policy service, a central hub for everything relating policies and submissions in Beesafe.
Running
Running the project the simple way
First you need to set your github access token to NPM_TOKEN (see .env.example). Windows:
set NPM_TOKEN=<your token>Ubuntu:
export NPM_TOKEN=<your token>To simply run the project and start hacking away, just run
docker-compose up --buildThis will build the project and start it together with an instance of Postgres Database and a RabbitMQ service.
Changing the files in the project will reload the server, too.
Advanced
To start the project separately, you need to set up your .env file based on .env.example file. You need a postgres and a rabbitmq service running to be able to start the project.
To start the built version, you fist need to build it:
npm run buildand then
npm startTo start the live version, use:
npm run start:devTesting the message queue
To test if the messages work, you can enter the rabbit UI and search for the required queue http://localhost:15672/#/queues/%2F/policy-service
Default user-password: guest guest
Here, you can send a message with the body:
{
"cmd": "policyService.test.testMessage",
"content": ""
}Testing
Tests cover the controllers, to run them use:
npm test3 years ago