Closed SignIn-SignUp closed 3 years ago
This is great! Thanks for making this.
If you don't mind, I'll try replacing the python test script with some Haskell or a jq
invocation.
That would be great. I didn't know about the existence of jq so thank you for that.
The main reason why I used the python script is because the json that is sent has string values containing '\n' for the "ascii-plants". I wasn't able to make it print the '\n' and make the "ascii-plants" look nice any other way. That's why I used a hacky python script.
I don't mind and actually would appreciate if you found a way to solve that more elegantly.
PS: Also mentioned as a comment. But the plant json that is sent can not be sent back to the application as is. The text and "ascii-plant" have to be removed from the value of stage i.e. {..."stage":"Seed",..}.
This commit adds the Plantfarm dir in examples containing:
a simple CRUD app in examples/Plantfarm/Plantfarm.hs.
a pretty printer for json response from Plantfarm example in example/Plantfarm/plant_pretty_print.