DATx02-16-14 / Hastings

A project evaluating Haste.App and the suitability of Haskell for the web.
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Hastings Build Status

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.

Members

Benjamin Block, Joel Gustafsson, Michael Milakovic, Mattias Nilsen, André Samuelsson

Setup

The project uses stack and haste-cabal to compile the server and the client respectivly.

Stack install

See https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md

haste-cabal

See https://github.com/valderman/haste-compiler

Build project

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

Database

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';