Easily connect Appwrite to Nuxt
npm install nuxt-appwrite
Cover Image by @Atinux
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]
[![Codecov][codecov-src]][codecov-href]
[![License][license-src]][license-href]
Appwrite is a self-hosted solution that provides developers with a set of easy-to-use and integrate REST APIs to manage their core backend needs. This module is made to connect Appwrite SDKs to Nuxt more easily.
First, add nuxt-appwrite dependency to your project
``bash`
npx nuxi@latest module add appwrite
Next, add nuxt-appwrite to the modules section of nuxt.config
`js`
export default {
modules: ['nuxt-appwrite'],
appwrite: {
/ module options /
}
}
- type: Stringhttps://cloud.appwrite.io/v1
- default:
Appwrite API endpoint (Console -> Project -> Setting -> API Endpoint)
- type: Stringnull
- default:
Appwrite project ID (Console -> Project -> Setting -> Project ID)
- type: Stringen
- default:
Appwrite locale
`js`
export default {
modules: [
'nuxt-appwrite'
],
appwrite: {
endpoint: 'https://cloud.appwrite.io/v1',
project: 'nuxt-playground',
locale: 'en'
}
}
Using useAppwrite composable:
`js`
const { account } = useAppwrite()
try {
const res = await account.get()
console.log(res)
} catch (err) {
console.log(err)
}
Currently Not Supported
1. Clone this repository
2. Install dependencies using yarn install or npm installnpm run dev`
3. Start development server using
Copyright (c) Herdi Tr.
[npm-version-src]: https://img.shields.io/npm/v/nuxt-appwrite/latest.svg
[npm-version-href]: https://npmjs.com/package/nuxt-appwrite
[npm-downloads-src]: https://img.shields.io/npm/dt/nuxt-appwrite.svg
[npm-downloads-href]: https://npmjs.com/package/nuxt-appwrite
[github-actions-ci-src]: https://github.com/Hrdtr/nuxt-appwrite/workflows/ci/badge.svg
[github-actions-ci-href]: https://github.com/Hrdtr/nuxt-appwrite/actions?query=workflow%3Aci
[codecov-src]: https://img.shields.io/codecov/c/github/Hrdtr/nuxt-appwrite.svg
[codecov-href]: https://codecov.io/gh/Hrdtr/nuxt-appwrite
[license-src]: https://img.shields.io/npm/l/nuxt-appwrite.svg
[license-href]: https://npmjs.com/package/nuxt-appwrite