Giter Club home page Giter Club logo

nchessonline's Introduction

NChess Online

NChess Online is a basic chess app that allows people to play chess against their friends.

Environment

The app should work with all environments that have installed. If you are having issues running commands try upgrade your node version (should work with node >14)

Local

You can run a local node server using this command. The app will start at localhost:8080

npm start # run local web server

Some scripts/npm commands will not work if you have not set up the python virtual environment

source ./backend/venv/bin/activate (venv) npm run clear_db // OR ./scripts/clear_local_database.sh

Docker

docker build . -t chess-image # Builds docker image that runs chess app server docker run -d -p 8080:8080 chess-image # Runs docker image in background on port 8080

Deployment

Heroku

git push heroku master

Unit tests

npm run test

End To End testing

The end to end test run using cypress. Make sure the app is running locally before starting tests and that the python virtual environment is activated

// Prerequisites
source ./backend/venv/bin/activate
npm run start
npm run start:backend

npm run e2e
npx cypress open

The tests rely on PGN files in the LAN format. These files can be found in the fixtures folder of the cypress tests.

Most PGN formats are in the SAN format hence must be converted. You can use the pgn-extract to convert SAN files to LAN files.

pgn-extract.exe -Wuci < file.pgn # WINDOWS: SAN -> LAN

nchessonline's People

Contributors

nanaasiedu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.