A project for the course DATX02 at CHALMERS UNIVERSITY OF TECHNOLOGY.
The project aims to assess the suitability of programmig client-server applications in Haskell using Haste.App, supplying feedback to the devloper and demonstrating advantages (if any).
More concretely the project aims to create a simple game lobby and an implementation of chinese checkers.
Benjamin Block, Joel Gustafsson, Michael Milakovic, Mattias Nilsen, André Samuelsson
The project uses stack and haste-cabal to compile the server and the client respectivly.
See https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md
See https://github.com/valderman/haste-compiler
Run stack setup
in the project root.
Then compile the server and run it by using make all
, this will execute the following commands:
# Builds the project using GHC
stack build
# Builds the project with the haste compiler
haste-cabal configure && haste-cabal build
# Embeds the javascript files in the runnable, force so the command will run even if no changes has been made.
stack exec -- Hastings-exe --embed dist/build/Hastings-exe/Hastings-exe --force
# Run the server
stack exec Hastings-exe
This application uses a MySQL database to store some of its data. The development version connects to the database with this connection information by default:
Host = "localhost",
Port = 3306,
User = "root",
Password = "",
Database = "hastings"
The schema hastings must be created manually before running the application for the first time, to do so execute this query on your database.
CREATE SCHEMA 'hastings';