☁ Deploying a Nuxt.js (v2) App to Google App Engine (Google Cloud Platform)
--
This article will help you deplyoing a Nuxt 2.0 application to Google’s App Engine — in no time 🔥.
❗️️Update: I now also updated the official Nuxt documentation with a guide for Google App Engine, check it out: https://nuxtjs.org/faq/appengine-deployment
1) Install Nuxt.js
⏭ skip to section 2 if you already have a Nuxt.js project running ⏭
Follow the instructions on the link below to create a basic nuxt app:
https://github.com/nuxt/create-nuxt-app
npx create-nuxt-app <my-project>
❗️️ Make sure to replace “<project-name>” with your project-name!
You can choose which options you like yourself, but make sure to have rendering mode “universal” applied so it is a SSR project.
? Project name nuxt2-appengine
? Project description Deploying Nuxt 2.0 to Google App Engine
? Use a custom server framework none
? Use a custom UI framework none
? Choose rendering mode Universal
? Use axios module no
? Use eslint no
? Use prettier no
? Author name Pascal Luther
? Choose a package manager npm
After following the installation instruction you should be able to run your project and see the following:
2) Setting Up the App on App Engine
⏭ skip to section 3 if you already have the set up your App Engine App ⏭
❗️️If you haven’t set up a Google Cloud account and a project yet, please do so now on console.cloud.google.com. This is documented well in Google’s documentation and is not covered in this article.
Now visit https://console.cloud.google.com/appengine and click on “Enable App Engine”. You go through a very short setup process and should have your App Engine enabled and see this screen:
Done, your App Engine application is ready to be deployed to.