Create the SocketIO Client
Video Lecture
(Pay Per View)
You can use PayPal to purchase a one time viewing of this video for $1.49 USD.
Description
First create a new HTML file called index.html in the ./dist/client/
folder and add this HTML.
./dist/client/index.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
In order for our server to serve this static HTML file, we can use express
and point it to a folder to serve files from.
./src/server/server.ts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Install the Express module.
npm install express
Also install the type declarations/definitions since they are not included with the express library.
npm install @types/express --save-dev
Restart the server,
npm run dev
Visit http://127.0.0.1:3000