Skip to content

apollo-agit/apollo-rules-microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Profile Rule Server

Summary

The Profile Rule Server is an example Javascript server that executes a rules engine against the client request Fact. The appropriate response message will be returned, otherwise simple boolean "true". These rules are tenant based and each rule can be extended, added, or ignored based on the tenant id. The example project is called Profile Rule but in reality could be used for any rule endpoint.

###Example Request Response

Example Milpark Message

Note: Milpark engine extends the Email Rule

Request
{
    "tenantId": "101",
	"fact": {
		"firstName": "ian",
		"lastName": "hamilton"
	}
}
Response
{
    "fieldName": "email",
    "fieldMessage": "Email must exist"
}

####Example IES Message Note: IES does NOT extend the email rule

Request
{
    "tenantId": "555",
	"fact": {
		"firstName": "ian",
		"lastName": "hamilton"
	}
}
Response
true

How to Run

* git clone https://github.com/apollo-agit/profile-rules-server.git
* cd profile-rules-server
* npm install
* npm run build
* node build/server.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors