- Install TypeScript
npm install -g typescript
- Install dependencies
npm install
- Build the server and client scripts
tsc -p ./src/server
tsc -p ./src/client
- Start it
npm run start
- Visit http://127.0.0.1:3000
-
After opening the project in VSCode, open the file
client.ts
. If VSCode is showing red squigly's under the import paths, then press F1, then select 'Restart TS Server' -
While running
npm run dev
, any edits to theclient/client.ts
orserver/server.ts
you make will be auto recompiled and you should refresh your browser to see the changes.