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

Feature/express 4 migration #181

Merged
merged 8 commits into from
Oct 20, 2017
Merged

Feature/express 4 migration #181

merged 8 commits into from
Oct 20, 2017

Conversation

robertcoopercode
Copy link
Collaborator

@robertcoopercode robertcoopercode commented Oct 20, 2017

Issue

Fixes #140

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Now using Express 4.x instead of version 3.

Screenshots (if appropriate):

How Has This Been Tested?

  • I have added tests to cover my changes.
  • All new and existing tests passed.

This change is Reviewable

@robertcoopercode
Copy link
Collaborator Author

@vinitkumar I'll let you merge this into master.

@vinitkumar
Copy link
Owner

@Engineering-Robert Mostly looks great! One question though, did we needed to move server.js into app? I intentionally kept it outside as it has little to do with app code.


app.use((req, res) => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to remove the render of 404 page on not found routes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya, the 404 page was always being rendered when it was included in express.js, so I had to move it to the bottom of routes.js. I think it has to do with not using app.router (deprecated) anymore.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay!

@robertcoopercode
Copy link
Collaborator Author

A lot of projects i've been looking at have their main server file in a "src" folder so I wanted to follow along with that practice by adding our server.js into the app folder. This way our root directory only contains dot files, READMEs, and other config stuff. Thoughts?

@vinitkumar vinitkumar merged commit 8428821 into master Oct 20, 2017
@vinitkumar vinitkumar deleted the feature/express-4-migration branch October 20, 2017 18:36
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

Successfully merging this pull request may close these issues.

Migrate all Express code to use version 4
2 participants