Multiplayer UNO fully in Vanilla Javascript and running on Node.JS server.
You can use this project on localhost or on a Node.js server to use it online.
Clone this project and open current directory into a terminal, then install dependencies by running:
npm install
After installing the dependencies, start the project by running:
npm start
App will be available on localhost at specified port in the bin/www file (> defaultPort) or you can specify it in an environment file .env
.
Multiplayer WebSocket server will automaticaly start on port 8081 nothing more is required.
Multiple games can be played in the same time, players are automatically matched.
An easy way to do is to enable ProxyPass on virtual host and configure the server as follow.
To serve the Node application:
<VirtualHost *:80 *:443 >
...
ProxyPass / http://localhost:[app-port]/
ProxyPassReverse / http://localhost:[app-port]/
</VirtualHost>
To serve the WebSocket:
<VirtualHost *:80 *:443 >
...
ProxyPass / ws://localhost:[socket-port]/
ProxyPassReverse / ws://localhost:[socket-port]/
</VirtualHost>
For the moment game can be played with only two players and UNO button is not working.
On certain versions of Firefox and Chrome, the front face of the cards may not be displayed.