This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go to the folder where you want to install things | |
cd "C:\Users\" + $env.UserName | |
# Create a new folder for the labs and enter it | |
mkdir tnm040-labs | |
cd tnm040-labs | |
# Download | |
wget "https://nodejs.org/dist/v10.16.3/node-v10.16.3-win-x64.zip" -outfile "node.zip" | |
Expand-Archive ./node.zip -DestinationPath ./node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const net = require('net'); | |
const connection = { | |
connect: (onConnected) => { | |
this._client = net.createConnection({ port: 8000 }, () => { | |
console.log('Connected to OpenSpace backend'); | |
onConnected(); | |
}); | |
this._client.on('data', (data) => { |