/typetrial

An online typing game with a focus on fun

Primary LanguageTypeScript

Setup

These instructions have been tested on Ubuntu

You can see our full repo on github, along with our issues at https://github.com/blchelle/capstone

Check out it out live at http://3.16.27.120:8080/

  1. Ensure you have node with a version > 16.0.0 and yarn installed on your machine.
sudo apt update
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install 16
sudo npm i -g corepack

Confirm this by running the following. Ensure the node version is higher than v16.0.0

$ yarn --version
1.22.15
$ node -v
v16.14.2
  1. Install and set up mySQL
sudo apt install mysql-server

Start the server:

sudo systemctl start mysql.service

OR

sudo service mysql start  #works on WSL

Now connect to the database and set up a root account with no password:

sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
FLUSH PRIVILEGES;
EXIT;
  1. Install all npm dependencies From within project root
yarn
  1. Create a new database
yarn dev:db
  1. Run tests:
yarn test
  1. Run the development environment:
yarn dev
  1. Check out the website:

Navigate to http://localhost:3000/

Other Commands

  • Generate prisma type definitions for database
yarn prisma:generate
  • Migrate prisma schema to mysql database
yarn prisma:migrate:dev
  • Start prisma studio to view the database in a web UI
yarn prisma:studio:dev
  • Reset database to a seeded sample db with existing races and users
yarn prisma:reset:dev

Setting up both git servers

More details on setting up

git remote add origin git@github.com:blchelle/capstone.git
git remote add production ece493_YOURCCID@gitrepo.ece.ualberta.ca:ece493_YOURCCID.git