Skip to content

hdnha11/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe

A simple tic-tac-toe implementation which allow two users to take turns at entering X and O. Define the end conditions of the game and provide an alert message for the different outcomes of the game. Keep track of the game states.


Live Demo

Development

Using Docker

Get Docker

Get Docker Community Edition for your platform (Linux, Mac, Windows).

Spin up the app

$ docker-compose up -d

Stop the server

$ docker-compose down

Rebuild image

$ docker-compose up -d --build

Visit localhost:9000 on your browser.

View logs

$ docker-compose logs -f web

Using local Node.js

Install Node.js dependencies

$ npm install

Start dev server

$ npm run dev

Production

Using Docker

Build the image

$ docker image build -f Dockerfile.prod -t tic-tac-toe:v1 .

Run the app

$ docker container run -d -p 8080:8080 -e PORT=8080 tic-tac-toe:v1

Visit localhost:8080 on your browser.

Using local Node.js

Install Node.js dependencies

$ npm install

Build the app

$ npm run build

Run the app

$ npx http-server -p 8080 dist

Deployment

$ docker image build -f Dockerfile.prod -t tic-tac-toe:v1 .
$ docker image tag tic-tac-toe:v1 registry.heroku.com/nha-tic-tac-toe/web
$ docker image push registry.heroku.com/nha-tic-tac-toe/web
$ heroku container:release web

Releases

No releases published

Packages

No packages published

Languages