Skip to content

saurookadook/connect-four-app

Repository files navigation

connect-four-app

A little Conect Four app built using:

Demo of Connect Four application with side-by-side browsers

Getting Started

🚧 Under Construction 🚧

1. Install local Node packages

nvm use
corepack enable
yarn install

2. Generate certs and other changes for NGINX

If you don't have mkcert installed already, install it. πŸ™‚

brew install mkcert
# NOTE:
# If this is your first time using mkcert, you'll need to run it with
# the `-install` flag. This only needs to be done once, and it creates
# a local certificate authority against which we will create our own
# self-signed SSL certificates.
mkcert -install

If this is your first time going through the setup instructions, you will need to make the install.sh script executable.

chmod +x nginx-reverse-proxy/install.sh

Finally, run the script. πŸ™‚

nginx-reverse-proxy/install.sh

3. Build and Start the Docker Containers

docker compose up --build --no-cache all -d

Scripts

There are a number of root-level scripts for working with each workspace:

yarn client:base
yarn server:base
yarn shared:base

Seeding the Database

There are also scripts for seeding your local MongoDB instance.

# Just to make sure that the database container is running
docker compose up mongo -d

yarn server:ncs seed_db

Note: ncs stands for 'nest commander script'

Other scripts supported by server:ncs can be found in the server/src/scripts/commands/ directory.

Running Tests

client

yarn client:test

server

yarn server:test

shared

yarn shared:test

Project Structure

connect-four-app
  ┣━━ πŸ“ client
  ┃    ┣━━ πŸ“ public
  ┃    ┣━━ πŸ“ src
  ┃    ┣ 🐳 Dockerfile
  ┃    ┣ πŸ“¦ package.json
  ┃    β”— βš™οΈ tsconfig.json
  ┣━━ πŸ“ server
  ┃    ┣━━ πŸ“ src
  ┃    ┣━━ πŸ“ test
  ┃    ┣ 🐳 Dockerfile
  ┃    ┣ πŸ“¦ package.json
  ┃    β”— βš™οΈ tsconfig.json
  ┣━━ πŸ“ shared
  ┃    ┣━━ πŸ“ src
  ┃    ┣ 🐳 Dockerfile
  ┃    ┣ πŸ“¦ package.json
  ┃    β”— βš™οΈ tsconfig.json
  ┣ 🐳 docker-compose.yaml
  ┣ πŸ“¦ package.json
  ┣ βš™οΈ tsconfig.json
  β”— πŸ”’ yarn.lock

Releases

No releases published

Packages

No packages published

Languages