diff --git a/docs/documentation/guides/node.mdx b/docs/documentation/guides/node.mdx index 098352c3e..9da99441a 100644 --- a/docs/documentation/guides/node.mdx +++ b/docs/documentation/guides/node.mdx @@ -65,7 +65,7 @@ const setupClient = () => { siteUrl: "your-infisical-instance.com" // Optional, defaults to https://app.infisical.com }); - await client.auth().universalAuth.login({ + await infisicalSdk.auth().universalAuth.login({ clientId: "", clientSecret: "" }); @@ -77,12 +77,12 @@ const setupClient = () => { app.get("/", async (req, res) => { - await setupClient(); + - const name = await client.getSecret({ + const name = await client.secrets().getSecret({ environment: "dev", // dev, staging, prod, etc. projectId: "", - path: "/", + secretPath: "/", secretName: "NAME" }); @@ -90,7 +90,8 @@ app.get("/", async (req, res) => { }); app.listen(PORT, async () => { - // initialize http server + // initialize http server and Infisical + await setupClient(); console.log(`Server listening on port ${PORT}`); }); ```