Skip to content
Snippets Groups Projects

WebSocket example: Whiteboard with client websocket service

Setup database connections

This example does not use any database. You can therefore create empty config.ts files:

touch server/config.ts server/test/config.ts

Start server

Install dependencies and start server:

cd server
npm install
npm start

Run server tests:

npm test

Compared to the previous example project, the only additional dependency is ws.

Bundle client files to be served through server

Install dependencies and bundle client files:

cd client
npm install
npm start

Run client tests:

npm test