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

Change name of the handler function to router #52

Open
ZooeyMiller opened this issue Dec 2, 2017 · 2 comments
Open

Change name of the handler function to router #52

ZooeyMiller opened this issue Dec 2, 2017 · 2 comments

Comments

@ZooeyMiller
Copy link

From points raised from Founders and Coders students whilst doing this workshop (documented in foundersandcoders/master-reference#781) we would like to change the name of the handler/handler.js function/file to router/router.js.

The reasoning would be that this function is what handles the routing of the request (via the if(endpoint === "/") etc block). The logic for actually handling each request (serving resources etc) can be abstracted into separate functions, but the function directly passed to http.createServer always has to deal with routing.

The work needed for this would be to change all references to the handler function or the handler.js file to router or router.js respectively.

@ZooeyMiller
Copy link
Author

@node-girls If this criteria is acceptable, could we add on a help-wanted and a 24PR label?

@claireinez
Copy link
Member

Thanks @ZooeyMiller, we'd love for this to be done as part of 24 pull requests!

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

No branches or pull requests

2 participants