Skip to content

Instantly share code, notes, and snippets.


Chris Anderson jchris

View GitHub Profile
View for sale
View paginate2.js
import faunadb, {query as q} from 'faunadb'
const client = new faunadb.Client({
secret: "x"
async function runThese() {
var edits = 20
View paginate.js
import faunadb, {query as q} from 'faunadb';
const client = new faunadb.Client({
secret: "XXXXXX"
async function runThese() {
const ref = q.Ref(q.Class("posts"), 6)
jchris / faunadb-local-hello.js
Last active Jul 13, 2017
connect to FaunaDB Developer Edition on localhost
View faunadb-local-hello.js
var faunadb = require("faunadb");
var q = faunadb.query;
var client = new faunadb.Client({
secret: "secret",
scheme: 'http',
domain: '',
port: 8443
jchris / example.go
Created Nov 14, 2016
Executable example for FaunaDB Go release blog post
View example.go
package main
import (
f ""
// I guess we can blog about how easy is to integrate your data structures with fauna using the go driver
// which, in my opinion, is one of the easiest so far.
jchris /
Last active Oct 13, 2016
Code Portfolio

This is a non-exhaustive list of (mostly) open source work in roughly chronological order. Most of my production code is in Erlang, JavaScript, and Go, with application code in JavaScript, Objective-C, and C#. The theme that emerges is a focus on developer experience, and on pushing the envelope for edge compute.

Ruby on Rails

Apache CouchDB _users database


This is a listing of various examples used for the Couchbase Go SDK GA Release Blog.

Blog Post

jchris / Couchbase Lite with React
Last active May 4, 2018
Couchbase Lite with React Native
View Couchbase Lite with React

Couchbase Lite with React Native

I went into this expecting a challenge but it was easy. Basically, Couchbase Lite has always had an optional HTTP listener that you can connect to from inside your app at http://lite.couchbase./mydatabase/. React Native has a fine XHR module and encourages using fetch so getting your app to sync can be as easy as adding some API calls to keep JSON in the database.

We haven't done a full example yet, but in the spirit of possiblity, here are quick instructions to connect Couchbase Lite iOS with a React Native app (generated from their cli).

View startListener.swift
// MARK: - Listener
func startListener() -> Bool {
if listener != nil {
return true
var error: NSError?
listener = CBLListener(manager: CBLManager.sharedInstance(), port: 0)
// Enable Basic Authentication
View cbl log
2015-02-09 13:55:51.265 TodoLite[25539:1536873] Apache Cordova native platform version 3.7.0 is starting.
2015-02-09 13:55:51.265 TodoLite[25539:1536873] Multi-tasking -> Device: YES, App: YES
2015-02-09 13:55:51.268 TodoLite[25539:1536873] Unlimited access to network resources
2015-02-09 13:55:51.271 TodoLite[25539:1536873]
Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file