Try to get a minimum useful REST service from Scotty
- You need stack installed: https://github.com/commercialhaskell/stack
- Clone this repo
- You might need the right GHC. From the project dir:
stack setup
- The build will try to create the mysql library, for that you need
mysql_config, on Ubuntu,
sudo apt-get install libmysqlclient-dev
- Also, right now you need a local mysql DB with a non-password-protected root account and a database called 'test'. Sorry. Fixing it shortly.
From the project dir: stack exec haskell-scotty-spike-exe
- Be greeted:
curl -v localhost:8099/hello
- Access MySQL data:
curl -v localhost:8099/answer