Consider the following example. We have a sales
class that has instances with the following shape.
{
date: '2019-04-21',
total: 1050,
salesperson: Ref(Class('users'), '1234')
}
Consider the following example. We have a sales
class that has instances with the following shape.
{
date: '2019-04-21',
total: 1050,
salesperson: Ref(Class('users'), '1234')
}
$> mkdir test | |
$> cd test/ | |
$> git init | |
Initialized empty Git repository in /home/ganwell/Repositories/test/.git/ | |
$> git checkout -b stable | |
Switched to a new branch 'stable' |
At the very least, we need two pieces of functionality:
If applicable, make sure your design component accounts for all these states. This is basically copied from the Nine States of Design Medium article. 😛
// Simulate a call to Dropbox or other service that can | |
// return an image as an ArrayBuffer. | |
var xhr = new XMLHttpRequest(); | |
// Use JSFiddle logo as a sample image to avoid complicating | |
// this example with cross-domain issues. | |
xhr.open( "GET", "http://fiddle.jshell.net/img/logo.png", true ); | |
// Ask for the result as an ArrayBuffer. | |
xhr.responseType = "arraybuffer"; |
Fauna doesn't (yet?) provide guaranteed expiration/TTL for ABAC tokens, so we need to implement it ourselves if we care about it.
3 javascript functions, each of which can be imported into your project or run from the command-line
using node path/to/script.js arg1 arg2 ... argN
:
deploy-schema.js
: a javascript function for creating supporting collections and indexes in your Fauna database.