Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We're switching HTTP servers from pushstate-server to Apache. Here's why:
Downsides of pushstate-server
Previously, we've been using pushstate-server as our HTTP server for serving up the production-ready site, as recommended by React. It's a simple HTTP server that works with a specific HTML5 feature called Pushstate.
However, this is not how pushstate-server was really designed. It's not designed to be run on port 80 as the primary production server for a website. I've had to employ a series of hacks to allow pushstate to serve up content on port 80 while not running it as root. I also don't know about the security implications of this.
Furthermore, pushstate-server doesn't allow for HTTPS connections. There are some alpha-stage projects that provide this and even a pull request, but they are young and untested.
Upsides of Apache
Switching to Apache means the site will behave more like any other site will. This means that assets will get served up in a standard way, the site assets can be combined with any other scripting language (like PHP), and Apache modules (rewrite, ssl, and others) will work with the portfolio. Guides for securing Apache installations are common, and Apache modules are very mature and reliable.
Ultimately, this means the project will be better-maintained and more robust. The web server should automatically restart when the server reboots. HTTPS will be supported. And we have flexibility for the server to behave... normally.