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

extensions object can be inside homeHandler func #29

Open
Bear-Coding opened this issue Aug 1, 2019 · 4 comments
Open

extensions object can be inside homeHandler func #29

Bear-Coding opened this issue Aug 1, 2019 · 4 comments
Assignees

Comments

@Bear-Coding
Copy link

Bear-Coding commented Aug 1, 2019

You are using the extensions only in the homeHandler score, so why would you need it usable for other funcs? ♻️

const extensionObj = {
html: 'text/html',
css: 'text/css',
js: 'application/javascript',
};

@Bear-Coding Bear-Coding changed the title extensions object can be inside homeHandler func extensions object can be inside homeHandler func ♻️ Aug 1, 2019
@Bear-Coding Bear-Coding changed the title extensions object can be inside homeHandler func ♻️ extensions object can be inside homeHandler func Aug 1, 2019
@samjam48
Copy link
Collaborator

samjam48 commented Aug 1, 2019

your last issue was about not having re-usable code.
And now there is an issue about having re-usable code.

Choose one side of this argument and stick with it rather than just making an issue about everything 🤨

@Bear-Coding
Copy link
Author

Thats two separated things, sometime you need re-usable code, and sometimes you don't. So its all about to know in what side I have to be.
In this issue, you are not using the object anywhere else, so you don't need it accessible from anywhere. ONLY IF you refactor the whole code which is another issue.

Can you add a link to my 'last issue'?

samjam48 added a commit that referenced this issue Aug 1, 2019
@samjam48
Copy link
Collaborator

samjam48 commented Aug 1, 2019

moved into home handler to resolve this issue.

I guess i did feel like maybe i would use it in the future and its nice to declare permanent constants outside of handlers and only define within handler specific contents inside them. but meh....

@samjam48
Copy link
Collaborator

samjam48 commented Aug 1, 2019

#28 you request me to make a re-usable handler for different style files though we do not have them yet.

@samjam48 samjam48 self-assigned this Aug 1, 2019
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

2 participants