Skip to content

Battleship... Pure.. Functional... Haskell + MongoDB + TypeScript + React... https://battleship-fp.com/

License

Notifications You must be signed in to change notification settings

DKurilo/battleship

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date
Jan 29, 2020
Feb 26, 2022
Jan 30, 2020
Jan 29, 2020
Nov 6, 2019
Jan 30, 2020
Nov 5, 2018
Jan 29, 2020
Nov 14, 2018
Nov 15, 2018
Dec 2, 2018
Nov 19, 2018
Nov 18, 2018
Jan 29, 2020

Repository files navigation

Battleship

Build Status

Pure.. Functional..
Haskell + Snap + MongoDB + TypeScript + React
https://battleship-fp.com/

Actualy, client has some impurity. It uses not immutable state. I don't know how to avoid it. Maybe you can help me.

To build client:

yarn install
yarn build

To build server:
Copy devel.cfg.template to devel.cfg. Fix parameters.

stack build
server/run_ssl.sh
stack run battleship-bot

SSL

In case you want to use HTTPS:
Run ./prepare_with_ssl.sh. it will create ssl keys. To run server ./run_ssl.sh and then in browser: https://localhost:9443/

Build for Linux

To build server for linux you can use special docker image.
Just run docker-composer up from deploy folder. Check ./deploy/build.sh for more information.

MongoDB

With admin access:

use battleship;
db.createUser({user:"battleshipuser", pwd: "your_password",roles:[{role:"readWrite",db:"battleship"}]});
db.createCollection("games");
db.createCollection("chats");
use battleshipbot;
db.createUser({user:"battleshipbotuser", pwd: "your_password",roles:[{role:"readWrite",db:"battleshipbot"}]});
db.createCollection("games");

ToDo

Tests. For everything!

About

Battleship... Pure.. Functional... Haskell + MongoDB + TypeScript + React... https://battleship-fp.com/

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published