Skip to content

nsallerin/memory-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory Game

Description

This project is divided into two main parts:

  • An Express API used to send and retrieve data to/from the database
  • A vanillia Webpack front-end application which displays and handles the game logic

Database

The Postgressql database is started in a Docker container with the configuration set in the server/docker-compose.yml file.

Migrations are handled with the server/database/init.sql file whose queries are automatically run during the first docker-compose launch.

To rerun the migrations:

docker-compose down
docker-compose up

Here are the columns created for the game table:

Field Type
id UUID
player string
time number
score string
is_won boolean

Setup

# Create environment variables files
cp client/.env.sample client/.env
cp server/.env.sample server/.env

# Install Docker
brew install docker

# Install dependencies
yarn install

Launch application

# from src/client
yarn dev

# from src/server
docker-compose up
# another terminal window from src/server
yarn dev

It will launch:

Tests

# from ./
yarn test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published