Open Trystan-Schmits opened 9 months ago
cd node_backend
npm install uuid
npm install socket.io
node index.js
This runs the server in your localhost so that you can play multiplayer on your own computer. Remember! in Multiplayer.js in platformer2 you need to set the socket to be the local server and not aws
"Node.js is a cross-platform, open-source JavaScript runtime environment that can run on Windows, Linux, Unix, macOS, and more. Node.js runs on the V8 JavaScript engine, and executes JavaScript code outside a web browser. Node.js lets developers use JavaScript to write command line tools and for server-side scripting."
Node.js will need to be installed to run the WebSocketServer on the localhost
to install Node.js we will use nvm.
Steps
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
nvm install node