add to server.js

Done, at least I think it is. Seems to work ok.