A sample Webpack build for the server.
$ npm i
$ npm run build
$ npm start
Note:
-
the
bufferutilandutf-8-validateare optional dependencies fromws, compiled from native code, which are meant to improve performance (ref). You can also omit them, as they have their JS fallback, and ignore the WebPack warning. -
the server is initiated with
serveClientset tofalse, so it will not serve the client file.