Node.js - collection.doc()

Get a reference to a document in the collection.

import { collection } from '@nitric/sdk'
const profiles = collection('profiles').for('reading', 'writing')
const drakesProfile = profiles.doc('Drake Mallard')

Parameters

  • Name
    key
    Required
    Required
    Type
    string
    Description

    The key of the document to reference.

See also

Last updated on Oct 22, 2024