Update server.js

Emit is now 'this.emit'