Like microservice providing a simple REST API in conjunction with Kafka.
Maintainer: Joel Roxell <[email protected]>
- Kafka
- MongoDB
- Redis
This service provides a Kafka/JSON REST API.
POST /like Creates a new like. : REQUEST BODY
** NOTE:** time
must be a string that can be parsed by Date()
{
"entity": "<string required>",
"userIds": "<[string]>"
}
RESPONSE
HTTP 201 - Like successfully created
{ "message": "success" }
HTTP 400 - Severity input invalid
{ "message": "invalid request body" }
Kafka topic: amor_create_container
value
{ "meta": { "createdBy": "kafka" } }
To be able to get this project up and running, you'll need:
- Docker
- Docker Compose
- Maven
Follow these steps to get going:
git clone [email protected]:JoelRoxell/amor.git
mvn package
docker-compose up
SCRIPT | USAGE | CAVEATS |
---|---|---|
mvn clean | Runs all unit tests using mocha | |
mvn package | Build a new jar file with dependecies. |
VARIABLE | DESCRIPTION |
---|---|
NODE_ENV | Sets the application to either production or development mode |
LOG_FILE | Decides where our log file will be stored |
This service has the following standards & workflows:
- Master branch should always be ready to deploy to production
- Pull requests with failing tests will be closed.
- This document should be filled out and up to date.
TODO