If you don't want to use the Nuxt scaffolding tool, you can use a package.json file and npm to install a Nuxt app for you. Let's find out how with the following steps:
- Create a package.json file in your root project:
{
"name": "nuxt-app",
"scripts": {
"dev": "nuxt"
}
}
- Install Nuxt in the project via npm:
$ npm i nuxt
- Create a /pages/ directory in your root project, and then create an index.vue page in it:
// pages/index.vue
<template>
<h1>Hello world!</h1>
</template>
- Launch the project with npm:
$ npm run dev
The app is now running on localhost:3000. You should see the index page you created with the Hello world! message on your screen when you run that address in your favorite browser.
However, whether you are going for the "barebones" or full stack option, you should understand the default directories that Nuxt requires for running your app...