Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index.js #35

Open
claireinez opened this issue Oct 9, 2015 · 4 comments
Open

index.js #35

claireinez opened this issue Oct 9, 2015 · 4 comments

Comments

@claireinez
Copy link

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
Copy link
Contributor

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

@hdrdavies
Copy link
Contributor

What do you think ❓❓

@claireinez
Copy link
Author

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
Copy link
Member

Jbarget commented Oct 11, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants