surrealdb / surrealdb.js

SurrealDB SDK for JavaScript
https://surrealdb.com
Apache License 2.0
301 stars 48 forks source link

SSL/TLS connection not work #90

Closed kratess closed 1 year ago

kratess commented 1 year ago
Surreal.Instance.connect(RPC).then(() =>
  Surreal.Instance.signin({
    user: USER,
    pass: PASS,
  }).then(
    Surreal.Instance.use(NAMESPACE, DATABASE).then(
      () => {
        console.log("connected")
        IS_DATABASE_CONNECTED = true
      }
    ).catch(er => console.log(er))
  ).catch(er => console.log(er))
).catch(er => console.log(er));

I use the same data I use in surrealist but this connection not work. No errors givven.

kearfy commented 1 year ago

Hi @kratess, the way that you are using the surrealdb.js library is not intended behaviour. Please have a look at the documentation on how to properly connect to and query your database!

https://surrealdb.com/docs/integration/libraries/javascript

kratess commented 1 year ago

@kearfy I am using it in this library https://github.com/kratess/FiveM-SurrealDB-wrapper and it is the only way to use it without buidl. It works fine without https but with it, it doesn't even give any error!

There is no way to help me out?

kearfy commented 1 year ago

Can I interpate that library as something that maps the JS library to lua? Might be worth a shot to try to connect to the surreal instance with https in your browser, as there are nice debugging tools there.