Commit 55b64ebc authored by Allele Dev's avatar Allele Dev

add: Main, README setup

parent ab6a7291
......@@ -27,6 +27,50 @@
Welcome! This tutorial develops a Haskell web service from
scratch. Here's an overview of the material to be covered:
# Setup
* Install [stack](https://github.com/commercialhaskell/stack)
* Clone the project: `git clone https://gitlab.com/cpp.cabrera/type-assisted-speed-runs.git`
* Run `stack setup` to get a Haskell compiler
* Run `stack build` to install dependencies and start learning!
* Run `stack run tasr-server` to run the server
## Database
This project requires postgreSQL for primary data storage. The easiest
way to get that running is to install it using your package manager.
Check out this [link](http://www.postgresql.org/download/) for next
steps. The default settings are:
* Database name: `strangeloop`
* Host: `localhost`
* Port: 5432
* User name: `strangeloop`
* Password: `cat`
## Redis
Redis is used for session key management. The easiest way to get that
set up is to use your package manager.
A default instance of Redis should be fine. Specifcially:
* Port: 6379
* Host: `localhost`
## Ad-hoc Testing
I'll be running through the demo using the
[httpie](https://github.com/jkbrzt/httpie) command line request
generator. The following will probably also work:
* Chrome [Postman](https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en)
* [cURL](http://curl.haxx.se/)
Use whatever you're comfortable using, as long as you can interact
with the server and see responses.
# Contributing
Contributions are welcome! Documentation, examples, code, and
......
module Main where
import qualified API.Routes as API
main :: IO ()
main = API.main
......@@ -72,3 +72,38 @@ library
hs-source-dirs: src
ghc-options: -Wall
default-language: Haskell2010
executable tasr-server
main-is: Main.hs
build-depends: base >=4.8 && <4.9
, Spock
, aeson
, base16-bytestring
, base64-bytestring
, bytestring
, containers
, cryptohash
, entropy
, fast-logger
, free
, hasql
, hasql-backend
, hasql-postgres
, hedis
, hostname
, http-types
, monad-control
, network
, network-uri
, text
, time
, transformers
, unix
, uuid
, wai
, wai-extra
, type-assisted-speed-runs
default-extensions: OverloadedStrings, ScopedTypeVariables
hs-source-dirs: src
ghc-options: -Wall
default-language: Haskell2010
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment