Hi there, I am trying to use the example with-emai...
# support-questions-legacy
b
Hi there, I am trying to use the example with-emailpassword from the supertokens github with my own back end and MySql database. I am getting the error "Something went wrong please try again" when submitting the signup form. Does anyone have any suggestions?
c
Maybe check your backend? are you using python or node
b
node
c
check your server side logs. Usually if it's a 500 error node would print something
b
hmm do you know how to do that with express
Im pretty new to this
thanks for your help btw
I added a print statement in the error handler in express in api-server.js
I do have supertokens running on port 3567 though so I am not seeing why it isnt picking it up
c
Are you sure everything is localhost?
nothing like 127.0.0.1
b
oh man Ill swap this out haha
I updated the IP to localhost, restarted supertokens and still getting the same error
Copy code
Error: No SuperTokens core available to query
...
GET /auth/signup/email/exists?email=aaronkopplin%40protonmail.com 500 3.442 ms - 21
c
and see if you get something
b
yeah that displays "hello" on the screen
c
SO that's means your node app isn't getting connected to the core
wanna share the url you're using to connect to the core?
b
from api-server.js
c
And both your frontend and backend use the apiDomain /auth?
b
im not sure
looks like Im using localhost:3001
c
your frontend, does it use the same config?
b
c
And what port is node running on?
b
node is on 3000 I believe
c
Then your apidomain needs to be that
b
ahh. What is the websitedomain then?
c
your frontend
in prod, apidomain would be "api.mysite.com", and websitedomain would be "www.mysite.com"
b
are the api and the server the same thing?
c
yes
node server serves your api at localhost:3000
b
thank you
c
Did it work?
b
everything is on 3000 now, but still getting error
: No SuperTokens core available to query
both app.js and api-server.js are using 3000 for the api port and the website port
c
do you have a frontend?
or are you just testing with postman
b
yes it is the default one that comes with supertokens
c
And that is a react app?
b
yes it is react
c
what port is the front end on?
b
that is from the browser
c
there can only be one 3000 at one time
if your frontend is using 3000, that means your node app is not
b
ok, I switched the API back to 3001. The website port is still on 3000
c
ok so the apidomain should be 3001
b
gotchya that is the case now
c
and the error persists?
make sure to restart both your node and react app
sometimes the env vars don't get loaded
To find out what port your node app is running on, find the code that has "app.listen(..."
b
ok. I am using npm run dev, which I think starts both the website and the server
c
hmm
so your react app and node app run on the same code?
are you using a full stack framework or smtg
b
the website is running on 3000, and the app.listen is using 3001
c
Right so they're on different ports right?
Simply put you just need to make sure apiDomain===node port, webstiteDomain===react port, and that both node and react have the same config
c
Right so react===3000, node===3001
b
yes that Is what I have
I suppose it is possible only the website is running on port 3000 and the server is not running.
is there a way to run the server independently using node?
c
so you only changed connectionURI to http://localhost?
b
I am very condifent that the server is running because I see the text api server listenign on port 3001 when the website launches
c
If you clone that example, and since you have ST running locally, what you need to do is 1. Have a mysql db set up with the name you specified in the config.yaml file 2. change the connectionURI for both frontend and backend
b
yeah, everything is on localhost
c
and when you run "supertokens start" it should create the right tables in your mysql db
do you have a mysql db set up correctly?
b
from mysql
c
ok that looks good
wanna call real quick?
b
all the tables were created automatically
sure!
c
btw im not a supertokens dev, just some random stranger online
haha
So if you think this support is lousy don't attribute it to the ST devs
b
thats fine I appreciate your help
c
cause theyre awesome!
dm me
r
Thanks for the help @chunkygoo. ! Appreciate it.