Nuxt Universal SSR

Aprenda como fazer um PWA usando Vue, Vuetify, Nuxt e Google Cloud.

Funcionalidades do Nuxt:

  • Write Vue Files (*.vue)
  • Server-Side Rendering
  • Powerful Routing System with Asynchronous Data
  • Bundling and minifying of your JS & CSS
  • Pre-processor: Sass, Less, Stylus, etc
  • Deployment facilitado na Google Cloud

Instalação

Instale o Yarn, gerenciamento de dependências rápido, confiável e seguro:

yarnpkg.com/lang/pt-BR/docs/install/#debian-stable

Instale o Nuxt através do comando:

yarn create nuxt-app <project-name>

nuxtjs.org/guide/installation

Selecione as seguintes opções de instalação no terminal:

> Generating Nuxt.js project
? Project name <project-name>
? Project description <project-description>
? Use a custom server framework express
? Choose features to install Progressive Web App (PWA) Support, Linter / Formatter, Prettier, Axios
? Use a custom UI framework vuetify
? Use a custom test framework jest
? Choose rendering mode Universal
? Author name <project-author>
? Choose a package manager yarn

Abra a pasta do projeto:

cd <project-name>

Agora é uma boa hora de salvar o projeto no GitHub ou GitLab:

git add .
git commit -m 'create nuxt-app'
git remote add origin https://github.com/<project-github>/<project-name>.git
git pull origin master --allow-unrelated-histories
git push -u origin master

Rode localmente usando o Yarn:

yarn run dev

Acesse:

http://localhost:3000