To add ws to your file’s simply use:
var ws = require('ws');