Hi all
# spicedb
a
Hi all I am new to SpiceDB ecosystem and was exploring SpiceDb Serverless but couldn't find documentation around the same. Can someone help me with this? I am looking at this as a contender in my application for FGA needs. Help will be appreciated. Thanks in advance !
v
Hey 👋 Have you tried authzed.com/docs ?
a
Hey ! Thanks for your response. Yes I did. In fact I followed the steps mentioned in this doc. But keep getting timeout errors which means it is unable to reach the server. Since I am using SpiceDB Serverless, I assume the endpoint of the service would be the one that is specified in the init config given in the above example.
v
That's right, the endpoint is grpc.authzed.com. Where is your client calling from? Authzed Serverless is running in us-east-1 so chances are it's just a bit far away.
what call is timing out?
a
We are calling from Mumbai (ao-south-1) and Frankfurt (eu-central-1)
v
can you share what commands are you using to call SpiceDB?
a
we are using NodeJS SDK -
Copy code
const authzedClient = v1.NewClient(
  process.env.AUTHZED_SERVERLESS_TOKEN,
  'grpc.authzed.com:50051',
);
// Write schema request
const writeRequest = v1.WriteSchemaRequest.create({
    schema: `
      definition ss2demo/user {}
      definition ss2demo/post {
        relation reader: user
        relation writer: user
        permission read = reader + writer
        permission write = writer
      }`,
  });

  // Write a schema.
  const writeSchemaResponse = await authzedClient.writeSchema(writeRequest);
v
The port is not 50051, it's 443. And I don't think you need to specify the endpoint if using serverless, see: https://github.com/authzed/authzed-node?tab=readme-ov-file#initializing-a-client
a
Actually, I tried both ways, with and without the endpoint, somehow didn't work for me either ways
Will still give it another shot and get back
3 Views