np
nuxt-pouch
npm i nuxt-pouch
np

nuxt-pouch

Super simple PouchDB integration for nuxtjs apps

by Stefan Buhrmester

0.1.0 (see all)License:MITTypeScript:Not Found
npm i nuxt-pouch
Readme

PouchDB (WIP)

Adds pouchdb to your nuxt application using vue-pouch, tightly integrating functionality from pouch-find, pouchdb-live-find and pouchdb-authentication.

(Better docs coming soon)

Setup

  • Add nuxt-pouch dependency using yarn or npm to your project
  • Add nuxt-pouch module to nuxt.config.js:
  modules: [
    'nuxt-pouch'
  ]

Usage

<template>
  <div class="todo-list">
    <input v-model="message" placeholder="New Todo">
    <button @click="$pouch.post('todos', {message: message});message=''">Save Todo</button>
    <ol>
      <li v-for="todo in todos">
        <input v-model="todo.message" @change="$pouch.put('todos', todo)">
        <button @click="$pouch.remove('todos', todo)">Remove</button>
      </li>
    </ol>
  </div>
</template>

<script>
  export default {
    // VuePouch adds a `pouch` config option to all components.
    pouch: {
      // The simplest usage. queries all documents from the "todos" pouch database and assigns them to the "todos" vue property.
      todos: {/*empty selector*/}
    }
  }
</script>

See the vue-pouch repo for documentation.

Downloads/wk

1

GitHub Stars

15

LAST COMMIT

5yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

4

OPEN PRs

0
VersionTagPublished
0.1.0
latest
5yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate