mkdir dumb-project && cd dumb-project
npm init -y
yarn add faunadb
docker run -p 8443:8443 fauna/faunadb
var faunadb = require('faunadb'),
q = faunadb.query
var client = new faunadb.Client({
secret: 'secret',
port: 8443,
domain: 'localhost',
scheme: 'http',
});
client.query(q.Now())
.then(function (res) { console.log('Result:', res) })
.catch(function (err) { console.log('Error:', err) })
$ node index.js
Result: Time("2022-05-24T21:06:36.248Z")