Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and Deploy
on: [push]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
with:
fetch-depth: 0

- name: Install and Build 🔧
run: |
npm install
npm run docs:build

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: docs
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
canhazdata
certs
node_modules
coverage
lib
docs
681 changes: 20 additions & 661 deletions LICENSE

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ const changedDocument = await client.getOne('tests', { query: { id: document.id
// client.on('DELETE:/tests/.*', ...)
// client.on('(PUT|PATCH):/tests/uuid-uuid-uuid-uuid', ...)

client.on('POST:/tests/.*', (path, collectionId, resourceId, pattern) => {
client.on('POST:/tests/.*', (path, method, collectionId, resourceId, pattern) => {
console.log(path) // === 'POST:/tests/uuid-uuid-uuid-uuid'
console.log(method) // === 'POST'
console.log(collectionId) // === 'tests'
console.log(resourceId) // === 'uuid-uuid-uuid-uuid'
console.log(pattern) // === 'POST:/tests/.*'
})

console.log( {
console.log({
document, /* { a: 1 } */
changed, /* { changes: 1 } */
changedDocument, /* { b: 2 } */
Expand Down Expand Up @@ -207,4 +208,4 @@ await client.unlock(lockId);
</details>

## License
This project is licensed under the terms of the AGPL-3.0 license.
This project is licensed under the terms of the MIT license.
38 changes: 0 additions & 38 deletions constants.js

This file was deleted.

Loading