jmhobbs@pyhacker /posts/migrating-to-nuxt

date
"2018-03-04T17:31:30.000Z"

whoami
jmhobbs

ls
comments content tags

wc content
372

cat content

Migrating to Nuxt

It's been 6 years since I migrated this site off of Django and onto Pelican. A lot has changed in the mean time. I still spend the majority of my time hacking in Python but for the past couple of years, frontend Javascript frameworks have really taken off.

At work (Carta), we use a variety of frontend languages including React and Vue. For me personally, Vue is the clear winner. Not only does it perform better than any other framework I've used, it's clear and concise syntax makes it the obvious choice for anyone working with even a moderately complex web app. Historically, I've never really been a fan of Javascript at all but after hacking some things together with Vue, that opinion has changed. It feels like a breath of fresh air; frontend code is actually enjoyable to write now!

Anyway, I've been writing all my frontend code using Vue for the past two years now and thought it was time to update the code powering this site. I also decided to host the site at Netlify, which, if you haven't heard of them, you should definitely check them out. You can connect a git repository to them (through Github, Bitbucket, or Gitlab) and they will automatically build and deploy your static site whenever code is pushed to master. They'll also build and deploy your site on every pull request and you can setup specific branches to be built whenever code is pushed to them as well (think develop and staging boxes, or demo boxes). They even have Let's Encrypt certificates for you and it's as easy as clicking a button to turn that support on.

Nuxt is a framework built on top of Vue. It allows you to rapidly build and deploy a static website with minimal effort. It has built-in support for Vue router and Vuex and automatically configures everything for you based on the existence of files in certain directories (all of which are setup for you when you start a new Nuxt project). What all this means is with minimal effort, I can build a single page app complete with dynamic routing and state management and have it deploy automatically whenever I push to the master branch.

wc tags
nuxt   vue   netlify   bitbucket  

cat comments