#Pi Test
- System requirements
- Java 8
- Maven 3
- Setup your verticle.cfg (or use this one as a default)
{
"server": {
"host": "localhost",
"port": 8080,
"base_path": "/",
"resources": ["org.daniel.ventas"]
},
"key.stringArray" : "stringsToProcess"
}
- Compile project
mvn package
- Deploy server
java -jar target/interview-1.0-SNAPSHOT-fat.jar --conf src/main/resources/verticle.cfg
- Test API
curl -H "Content-Type: application/json" -X POST -d '{"stringsToProcess":["stringtotest", "otherstringrandom"]}' http://localhost:8080/api/mix
Should return:
{
"result" : "1:tttt/2:rrr/2:nn/2:oo/1:ss"
}
curl -H "Content-Type: application/json" -X POST -d '{"stringsToProcess":["firstelementiiiiiillllll", "2 12213(( ^ seeeecondAYI32 ++ - element", "third&elementoooooo"]}' http://localhost:8080/api/mix
Should return:
{
"result" : "2:eeeeeee/1:iiiiiii/1:lllllll/3:oooooo/2:nn/1,3:tt"
}