0.0.1-27627055.9933660 • Published 2 years ago

@nuxthq/admin-edge v0.0.1-27627055.9933660

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@nuxthq/admin

Enhance Nuxt.com features as a Nuxt module.

Installation

yarn add --dev @nuxthq/admin

Then, register the module in your nuxt.config.js:

import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  buildModules: [
    '@nuxthq/admin'
  ]
})

If you want latest updates, please use @nuxthq/admin-edge in your package.json:

{
  "devDependencies": {
    "@nuxthq/admin": "npm:@nuxthq/admin-edge@latest"
  }
}

Usage

The module will expose an admin public runtime config:

const { admin } = useRuntimeConfig().public

admin.apiURL // default: https://api.nuxt.com

It will also expose the /api/_admin/components route to list the project components based on https://github.com/nuxtlabs/nuxt-component-meta.

You can configure the admin API URL by setting it in the .env or as environment variable in production:

NUXT_PUBLIC_ADMIN_API_URL=http://localhost:1337