liberty-x / twitter

We decided to make twitter EVEN better
4 stars 1 forks source link

index.js #35

Open claireinez opened 9 years ago

claireinez commented 9 years ago

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'.

hdrdavies commented 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:

hdrdavies commented 9 years ago

What do you think :question::question:

claireinez commented 9 years ago

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.

Jbarget commented 9 years ago

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?