Update server.js

- 303 instead of 307
- Use better name for that function