Connect to the product gadget app
I configured the gadget app in my next.js project.
I used this cmd.
npm install @gadget-client/origami
it was working well for development.
but I need to connect to the production. it is auto connected to the development.
how can I connected to the production?
18 Replies
Hello,
I think that's cause you're using the development client. You should update the package using:
yarn add @gadget/client@latest-production
and use that one in production.you mean I need to use @gadget/client@latest-production instead of @gadget-client/origami
don't need to add app name?
/origami
No, you need to install the latest production version of the package
import { OrigamiClient } from "@gadget-client/origami";
export const gadgetClient = new OrigamiClient({
authenticationMode: {
apiKey: process.env.GADGET_API_KEY,
},
});
this is my current code
Please take a look at these docs: https://docs.gadget.dev/api/example-app/development/external-api-calls/installing#updating-to-only-the-latest-production-version
I installed the production like this
and used production api key.
but still I have this error



Could you please share an image of the full version set in the package.json?

before

In the request you're trying to hit development. Try adding the environment option (set to "production") in the client instance settings: https://docs.gadget.dev/api/example-app/development/external-api-calls/installing#connecting-to-a-specific-environment
Installing - example-app Docs - Gadget
Gadget Docs
COOL š
THanks so much Sir š
Could you help me one more?
do you have experience in Embedded app checks?

if possible, I can make new thread š
Yes, please make a new thread
Good
I'm going to close this thread if this is resolved
Of course.
Do you like this answer?
ā