Amal Chandran
Amal Chandran•2w ago

Not able to connect to convex backend

I'm encountering an issue where I'm unable to connect to my Convex backend from a Node.js script, although the same endpoint URL works perfectly when accessed directly from my web browser.
import { api } from "@backend/convex/_generated/api";
import { ConvexHttpClient } from "convex/browser";


async function main() {

const jwtToken = ""

// Configure ConvexHttpClient with JWT authentication
const client = new ConvexHttpClient("https://********.convex.cloud", {
auth: jwtToken,
});

// Example: Use the client to make queries
const result = await client.query(api.emails.getEmails, {});

console.log(result);
}

main();
import { api } from "@backend/convex/_generated/api";
import { ConvexHttpClient } from "convex/browser";


async function main() {

const jwtToken = ""

// Configure ConvexHttpClient with JWT authentication
const client = new ConvexHttpClient("https://********.convex.cloud", {
auth: jwtToken,
});

// Example: Use the client to make queries
const result = await client.query(api.emails.getEmails, {});

console.log(result);
}

main();
No description
No description
3 Replies
Amal Chandran
Amal ChandranOP•2w ago
After going over the thread i have tried network test The failed network test is from my primary ISP and 2nd is from mobile hotspot Im also from India, is there any way i can change the deployment region to india
https://discord.com/channels/1019350475847499849/1209433309541830676/1209433309541830676
No description
Clever Tagline
Clever Tagline•2w ago
Convex is only currently deployed in us-east-1. Region expansion is on the roadmap, but it's been delayed a bit so that system stability could be addressed. Keep an eye on this FAQ entry for the latest (I'm updating it after every public announcement about region expansion progress; expecting an update in tomorrow's AMA).
Amal Chandran
Amal ChandranOP•2w ago
@Clever Tagline will keep an eye on the same 👀

Did you find this page helpful?