You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 torouter
/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 tohttp.createServer
always has to deal with routing.The work needed for this would be to change all references to the
handler
function or thehandler.js
file torouter
orrouter.js
respectively.The text was updated successfully, but these errors were encountered: