How to use the mongodb-stitch-browser-sdk Stitchappclientconfiguration in browser Javascript?

Asked

Viewed 24 times

0

I tried to use the code to inform localAppNamelocal and localAppVersion in Javascript, but I can’t find any clear examples on the web. Someone with knowledge about Stitch can show us the right one?

import {
    Stitch as Stitch,
    StitchAppClientConfiguration as StitchAppClientConfiguration
} from "mongodb-stitch-browser-sdk";

var ClientConfiguration = new StitchAppClientConfiguration.Builder().build()

ClientConfiguration.localAppName = 'My App'
ClientConfiguration.localAppVersion = '0.1'

Stitch.initializeDefaultAppClient('myapp-cast', ClientConfiguration)

I tried to find, but found nothing, no clear example on the web or in the documentation.

Gratitude for any help!

  • There are the entries in documentation associated with their sources. See if it helps

  • 1

    Based on the documentation I arrived at the above code, I tested and had as return the Object below in the panel Atlas Stitch appeared the correct version in client application connection control: "StitchAppClientConfiguration"{
 "baseUrl":"undefined",
 "storage":"undefined",
 "dataDirectory":"undefined",
 "transport":"undefined",
 "localAppName":"My App",
 "localAppVersion":"0.1"
}

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.