This is a project template for adonis-cli. If you do not already have it installed simply run:
npm install -g @adonisjs/cliAdonis 4 requires adonis-cli >= 3.0.14 (
adonis --version). If upgrading from Adonis 3.x remove the old version before reinstalling the latest version as above.
Once you have the CLI installed you can clone this template using the CLI which will automatically install all dependencies (where <project-name> is the name of your project):
# npm
adonis new --blueprint liam-potter/adonuxt-4 <project-name>
# yarn
adonis new --blueprint liam-potter/adonuxt-4 <project-name> --yarn- Install the relevant database package e.g. for Postgres: npm install pg(oryarn add pg)
- Configure your database options in the .envfile
| npm | yarn | Description | 
|---|---|---|
| npm run dev | yarn dev | Start Adonis server in development with Nuxt in development mode (hot reloading + watcher). Listen on http://localhost:3333 | 
| npm run dev-debug | yarn dev-debug | As above, with additional Adonis debugging available at chrome://inspect | 
| npm run build | yarn build | Build the Nuxt application for production | 
| npm run start | yarn start | Start the Adonis server in production | 
See Adonis features and Nuxt features
This template comes with a sample Adonis API endpoint for the User model. To use it simple run the sample migration and seed provided.
adonis migration:run
adonis seedAt some point I will update this boilerplate to also include a simple Nuxt CRUD interface for this endpoint 😄
- No more publicdirectory, useresources/staticinstead
- The resources\viewsdirectory is still available for non-Nuxt use but be wary that your.edgetemplates will live in the same directory as your Nuxt application code.
- The nuxt.config.jsfile is now inconfig/nuxt.js
- The Nuxt project directory is resources
