Question

Having an issue with database data fetching

Posted April 30, 2021 91 views
Node.jsDeploymentDatabases

Hi,
I’m facing some issue in deploying.

So I tried to deploy a nodejs API on digitalOcean .I will explain all the process what I did .Sorry I’m new to this.

1) I cloned the git to ssh
2) npm installed it,and try to run it on the ssh it self and it worked perfectly and I checked on the domain ip http://165.22.**.**:3003/v1/users and it provided all the users list .
3) then I installed the pm2 globally
3) and then I started the project using pm2 start ....
and checked on pm2 log for any issue, it shows as “ Executing (default): CREATE TABLE IF NOT EXISTS "routes” ..... | Database Configured
till then everything looks good.
but when I go to the link http://165.22.**.**:3003/v1/users ,it does not provide any output ,but on pm2 log the query getting Executing (default): SELECT “userId”, “user_category”,

Donot know what i’m doing wrong in this case.

I’m using Ec2 .

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi there,

It looks like that the query that you are seeing is trying to select a user from your database. Maybe you need to create a user in your database so that your app could work as expected, though this is just a guess as it is had to tell without looking into the code first.

Another thing that I could suggest is enabling Debug mode so that you could see more information in case that there are some errors occurring. Feel free to share the errors here if this is the case.

Regards,
Bobby