diff options
author | William Carroll <wpcarro@gmail.com> | 2021-01-22T10·49+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2021-01-22T11·00+0000 |
commit | e326b0da45a948668f523d5f715660981a9874c2 (patch) | |
tree | 34c425b23d122aa63b3a15d97b08298ee1db00c7 /assessments/tt/README.md | |
parent | 67e0f93b3bbc386421a276cbd5675f5ac51625ae (diff) | |
parent | ee8e75231cd9d3d4aa3ffbbfa0e3b8511712e1ee (diff) |
Add 'assessments/tt/' from commit 'ee8e75231cd9d3d4aa3ffbbfa0e3b8511712e1ee'
git-subtree-dir: assessments/tt git-subtree-mainline: 67e0f93b3bbc386421a276cbd5675f5ac51625ae git-subtree-split: ee8e75231cd9d3d4aa3ffbbfa0e3b8511712e1ee
Diffstat (limited to 'assessments/tt/README.md')
-rw-r--r-- | assessments/tt/README.md | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/assessments/tt/README.md b/assessments/tt/README.md new file mode 100644 index 000000000000..0231ef3ab8a4 --- /dev/null +++ b/assessments/tt/README.md @@ -0,0 +1,50 @@ +# TT + +All of the commands defined herein should be run from the top-level directory of +this repository (i.e. the directory in which this file exists). + +## Server + +To create the environment that contains all of this application's dependencies, +run: + +```shell +$ nix-shell +``` + +To run the server interactively, run: + +```shell +$ cd src/ +$ ghci +``` + +Now compile and load the server with: + +``` +Prelude> :l Main.hs +*Main> main +``` + +## Database + +Create a new database named `db.sqlite3` with: + +```shell +$ sqlite3 db.sqlite3 +``` + +Populate the database with: + +``` +sqlite3> .read populate.sqlite3 +``` + +You can verify that everything is setup with: + +``` +sqlite3> .tables +sqlite3> .schema +sqlite3> SELECT * FROM Accounts; +sqlite3> SELECT * FROM Trips; +``` |