This is a project template for adonis-cli. If you do not already have it installed simply run:
npm install -g @adonisjs/cli
Adonis 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 ChangJoo-Park/adonuxt-4-vuetify-boilerplate <project-name>
# yarn
adonis new --blueprint ChangJoo-Park/adonuxt-4-vuetify-boilerplate <project-name> --yarn
- Install the relevant database package e.g. for Postgres:
npm install pg
(oryarn add pg
) - Configure your database options in the
.env
file
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 seed
At some point I will update this boilerplate to also include a simple Nuxt CRUD interface for this endpoint 😄
- No more
public
directory, useresources/static
instead - The
resources\views
directory is still available for non-Nuxt use but be wary that your.edge
templates will live in the same directory as your Nuxt application code.
- The
nuxt.config.js
file is now inconfig/nuxt.js
- The Nuxt project directory is
resources