This is a very simple example of how to set up and communicate with a dedicated web worker.
A deliberately awful counting function is implemented in both the main thread and the worker. Use the buttons to start the process in the corresponding context.
npm install
Then:
npm run start