Hello, im here trying to use golang as connector t...
# support-questions-legacy
a
Hello, im here trying to use golang as connector the middleware, do you have a documentation how to call the libraries? a little bit confuse to just read the code 1 by 1
r
hey @Andhika Gaki
please pick the guides and follow the docs.
a
I did, i do follow the password less recipe, all been setup well, FE -> BE -> Middleware and the database its been setup, but here is the things, every api i called is return 200 ok without any {body}. i think i must setup the thing inside that code but im not sure what need to call
r
the TODO comment essentially should be replaced by your application APIs routes
a
i see, can we just use "npx create-supertokens-app@latest --recipe=passwordless" to try the environment?
r
yea
a
r
yea
a
nah, everytime i call /auth is always return 404, i think because of this function.
r
there is no route like /auth that we expose
see the api spec please.
a
wait
for the default it self what is the apibasepath?
so i can try it on postman
r
/auth
a
I did run the default setup and try to call http://localhost:3001/auth/signup/phonenumber/exist?phoneNumber?081133334222 got the 404
i see there is path /sessioninfo that will sent to the 404 if there is no path /sessioninfo. any thought of that?
r
thats just an example api
you can enable backend debug logs and show the output?
a
i got the answer thank btw, i do try self hosted on my local using postgresql, i did sign up and can do sign in, but in my database data user is not written
r
are you sure you provided the correct postgresql connection info to the core?
a
Sure the setting is in the middleware config.yaml right?
and the be connection is setting like that
r
yea. but is the core connected to your db at all?
a
it is will be set up on here?
r
yes
a
is this one the core setup? how to check it connected or not?
r
try signing up a user and seeing if it connects to the db or not
a
the return is OK but still not inserted into the db
r
which config yaml have you edited? the one in the installation directory or in the downloaded zip?
a
changed the config.yaml in the installation directory
is that correct?
r
yea. In installation dir is correct
can you start the core in foreground and show me the logs?
a
do you mean the middleware core? like that?
where the logs is located?
r
so it'
its using the in memory storager
oh i see..
in the config yaml file, you added the connection uri, but you did not uncomment that line..
remove the leading
#
from the postgresql_connection_uri line
a
i think its still not connected, but im still confused why the API is returning 200
r
you need to restart the core.
a
i do restart the core but still not connected to the database
r
Can you show me the config.yaml file?
a
the part i edited only on the connection uri
r
Hmm. What’s the location of this config file ok your machine?
On*
a
here its on the OS location C:\Users\62813\Downloads\supertokens
r
Yeaaaa. That’s not the right one
You need to edit the one in the installation directory
Run supertokens —help
a
its suppose to be like this right?
r
Yes
Edit the config file which is shown in the output
a
i cannot run the supertokens that inside the default path, have you chase this case?
or can i just run the supertoken outside?
r
Hey. Iv spent enough time trying to help out. Our docs are pretty clear. If things don’t work, try our docker image 🙂
a
oo okay, thank mate
for your help
its work, will inform my head of IT. thank you can closed the case
r
Ok great
2 Views