Skip to content

Instantly share code, notes, and snippets.

@bevacqua
Created October 15, 2014 15:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bevacqua/18768dcc95d5c40434d8 to your computer and use it in GitHub Desktop.
Save bevacqua/18768dcc95d5c40434d8 to your computer and use it in GitHub Desktop.

Hey there!

I'm pleased to announce that the Pony Foo blog has been completely rewritten from scratch! I've put a few months into it, but I got in many improvements, which I'm going to write a few articles about. Firstly, I wanted to write this email to introduce you to some of the concepts introduced to the engine.

Features

The blog is now backed by NGINX, properly and aggressively caching static assets. I'm using recluster to achieve zero-downtime deployments while keeping the application servers on two separate processes. I've moved away from Heroku, and now the production environment is hosted on AWS EC2. It's provisioned, configured with sensitive environment variables, and deployed-to using fast bash scripts.

Bash? Non-sense!

In this iteration I experimented with npm run, and I must say I became sort of addicted to it. For that reason, build and deployment scripts are now entirely written in bash. Of course, all of the regular Node CLI tooling was used, such as JSHint, UglifyJS, Penthouse, etc.

As far as performance goes, the build process completely automates asset optimization. Styles and scripts are minified, and so is the Markdown markup used to render articles. Views are compiled into functions ahead of time, and even inline assets are compressed using UglifyJS! Then comes the fun times, Penthouse is used to extract critical above the fold CSS. Those styles get inlined into the page to improve time-to-first-byte performance.

Closer to the front-end, it features a shared-rendering model, using Taunus. This allows Pony Foo to render views in the server-side and the client-side alike. The first request goes through the server, and every subsequent request is rendered on the browser. This results in fast client-side routing while being entirely crawlable by search engines and web crawlers (looking at you social media).

Taunus is made possible thanks to extensive use of Browserify, enabling vast code reuse across the platform. Browserify is used to share views, Markdown compilation, input validation, and more.

Notice

If you feel this email was unsolicited, please unsubscribe using the link found in the footer. Due to a database migration you might've been re-subscribed to the mailing list, but I promise you won't get any further emails if you unsubscribe. You'll find the unsubscription link in the footer of every single email sent by Pony Foo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment