How to use client and server-side JavaScript web workers