The SQA
To organize all our applications, we’ll create subfolders for every project in our chapters’ root folder. Since this app will run on Nuxt, we can use the Nuxi
CLI to install our project for us. From the root of our project, we’ll run the following command in the command line:
npx nuxi@latest init server
We’ll simply pick npm
as our package manager. Once the installation is done, navigate to the server
folder and run npm run dev
to start the application. By default, it will run on port 3000
. Upon opening the URL in your browser, you should see something like this:
Figure 8.2 – The welcome screen of a fresh Nuxt installation
While this may not look like much, please inspect the source of this page. Instead of rendering a virtual DOM to a <div id="app" />
element, Nuxt runs as a Node.js process, which (among other things) means that it supports server-side rendering of Vue components! This can...