Installation
Learn how to create a NuxtHub project or add it to your current Nuxt project.
Quickstart
The easiest way to get started with NuxtHub is to use our template. It includes all the necessary configuration and resources to get you started with NuxtHub.
Click on Use this template on github.com/nuxt-hub/starter to create a new repository based on the template.
You can also run this command to create a new project locally:
npx nuxthub init my-app
Add to a Nuxt project
- Install the NuxtHub package to your project:
pnpm add @nuxthub/core
- Install
wranglerdevelopment dependency to your project:
pnpm add -D wrangler
- Add
@nuxthub/coreto yourextendssection in yournuxt.config:
export default defineNuxtConfig({
extends: ['@nuxthub/core']
})
That's it! You can now use NuxtHub features in your Nuxt project.
.data/hub directory in your project root, which contains the necessary configuration files and resources for the features to work. It will also add it to the .gitignore file to avoid committing it to your repository.Options
Configure options in your nuxt.config.ts as such:
export default defineNuxtConfig({
extends: ['@nuxthub/core'],
hub: {
remote: true
}
})
Default to false - Allows working with remote storage (database, kv, blob) from your deployed project.
You can set NUXT_HUB_REMOTE=true in your .env file to enable the remote option.
Or use the --remote flag when running your Nuxt project locally (e.g. nuxt dev --remote).