-
Notifications
You must be signed in to change notification settings - Fork 16
Cleanup/Reorganize app.js #42
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that "reorganized middleware imports and usage" is not a useful change as doesn't follow clean code best practices. All dependencies must be declared to the top of the file. This allow other developers to see quickly what dependencies are used in the current file.
@ronaldtorres I understand, it's just a specific practice I've adhered to for my Regardless, I think the modification within the commit I just made brings it back to a cleaner state while still retaining the usage organization. Let me know if this change works for you. |
@nick-w-nick yes! that change is more clean for me... |
Hello, in this PR I've gone ahead and cleaned up/reorganized the
app.js
file.The changes include:
body-parser
with the built-in express middlewarehelmet
middleware which grants automatic generic security policiesI'm planning to apply this structure to the rest of the codebase in future commits but thought I'd start with the root of the application initially.
Let me know if you need any changes/etc.
Thanks!