-
Visit tc-cards
-
Fork the repository
-
Click the green Code button, and copy the clone url
-
Open your terminal or Git Bash
-
If you already have a repos folder:
$ cd repos
or if you need to create a repos folder:
mkdir repos cd repos
-
Use git to clone the repository from Github
git clone <url_from_github>
-
Install the dependencies and start the server.
$ cd tc-cards $ npm install
- Open js/table.js in your editor
- Find where socket.emit() accepts a string 'table-connect'
- The method's second parameter accepts the unique table id
- Replace 'id123' with the variable 'tableId' to pass in the correct table id to the server for connection
- Open js/table.js in your editor
- Find where VSCode is signalling an error in your JS syntax
- The method for creating a qr code is incorrect. Change the method to 'qrCodeGenerator'
- Open js/deck.js in your editor
- Find where "serverURL" (a string) is passed into the io.connect() method
- Replace the string with the variable serverURL (without quotes) in order for socket.io-client to connect with the server
- Open js/deck.js in your editor
- Find where 0 is assigned the value for 'strength'
- Replace 0 with 'strength' (not in quotes) to assign the value from the strength parameter to the strength property for each card
- To run the project after you fixed the changes, open your terminal and run:
npm run start
- Enjoy!