DocsReference
Star us on Github
Back to reference
  • Getting Started

    • Overview & Installation
  • APIs

    • api()
    • api.get()
    • api.post()
    • api.put()
    • api.delete()
    • api.patch()
    • api.route()
    • api.route.all()
    • api.route.get()
    • api.route.post()
    • api.route.put()
    • api.route.delete()
    • api.route.patch()
  • Collections

    • collection()
    • collection.collection()
    • collection.query()
    • collection.query.where()
    • collection.query.limit()
    • collection.query.pagingFrom()
    • collection.query.fetch()
    • collection.query.stream()
    • collection.doc()
    • collection.doc.get()
    • collection.doc.set()
    • collection.doc.delete()
    • collection.doc.collection()
  • Topics

    • topic()
    • topic.publish()
    • topic.subscribe()
  • Queues

    • queue()
    • queue.send()
    • queue.receive()
  • Secrets

    • secret()
    • secret.put()
    • secret.version()
    • secret.latest()
    • secret.version.access()
  • Storage

    • bucket()
    • bucket.file()
    • bucket.files()
    • file.read()
    • file.write()
    • file.delete()
    • file.getDownloadUrl()
    • file.getUploadUrl()
  • Schedules

    • schedule()
    • schedule.every()

Topics

Node.js - topic()

Creates a new Topic.

import { topic } from '@nitric/sdk';

const updates = topic('updates');

Parameters


name required string

The name of the topic to create.

Examples

Create a new topic

import { topic } from '@nitric/sdk';

const updates = topic('updates');

See also

  • topic.subscribe()
  • topic.publish()
Previous
collection.doc.collection()
Next
topic.publish()

On this page

  1. Parameters

  2. Examples

    1. Create a new topic
  3. See also

  • Company

  • Blog
  • Open Source
  • About Us
  • Use Cases
  • Framework

  • APIs
  • Collections
  • Messaging
  • Secrets
  • Storage
  • Developers

  • Docs
  • Languages
  • Reference
  • Downloads
  • Build with us

  • Support
  • Community
  • Roadmap

Get our newsletter

© 2023 Nitric Inc.

Contact SalesTerms & Privacy