Open claireinez opened 9 years ago
We did that so we could create the server in index.js. However, we shoud probably call index.js server.js, and call server.js handler.js. :confounded::confounded:
What do you think :question::question:
Okay I understand then! Yeah you do need to rename those files to be clearer.
Also, you might want to have a look at the issue @minaorangina raised on another team's repo here.
I've changed the names of the files now to represent the structure a bit better. We needed to separate the handler function and the creating the server since when we were testing our handler it would actually start the server and not close it when the test had finished.
Do you know of a better way around it when testing?
I don't understand the point of index.js - why not just use server.js? If it's because of the default 'main' file in your package.json, you could just change that to 'server.js'.