Deploying Nuxt JS
BARF. Seriously. BARF. Catch me 1 year ago and I would have told you, NEVER FUCKING DEPLOY A JS APP TO HEROKU. I’m here to tell you, I STILL HAVE NO IDEA WHY YOU WOULD. SEE - THERE IS THIS NEW SERVICE called now.
FUCK ME, they’re fucking great. YOU JUST PAY ONE MONTHLY PRICE (OR FREE) AND YOU GET UNLIMITED APPS for the bandwith you use. It ain’t about the fucking dynos (or dino-saurs / fucking fossils [as I now call those heroku things]).
got DNS problems? FUCK NO, zeit.world automatically figures out which server will respond fastest, just point your nameservers to their dns. HOLY SHIT COULDN’T BE EASIER (once you figure it out the first time).
WOW. What a great ass service. And the best part, deploying a js app is so fucking easy.
Here dem steps
- npm i -g vue-cli
- vue init nuxt/start
- npm install
- npm run dev ^^ that starts your dev server
- now ^^ that deploys your shit to the world wide web
That command will copy a url which will display your website. To point your dns to that server, simply do…
$ now alias my-app-name-safsxyeqajk.now.sh my-custom-domain.com
Seriously, someone finally made the life of a coder easier. Very weird day of discovery. I find it weird because I didn’t find anything that I hated about them. NOTHING.