Hai, I'am new to postgresql,
I built an app using node js with postgresql database, and I dont know how to connect it in aaPanel, everything run smoothly in localhost

I created db in aaPanel

and there is not information the connection is success or not

I tried to access api, and the result shows, there is no connection to db

can you help me?

    almagribi
    Hello, is the problem solved? Please check whether the database information configured in the website program is correct?

    config is ok,
    there are still error when creating table, the error permission denied for public schema

      I've done it, still there is no connection to database,

      but when I connected from local it works

        My suggestion is to run the app on a server via ssh, you can watch what problems occur.

        Hello, I suggest you check if the configuration is correct?
        Postgresql uses port 5432 by default and can only connect locally. Do you want to modify it?
        From your previous screenshot, you can see if the database name and username and password are consistent. Please check

        almagribi

        I've edited
        here is the new one

        the problem remain the same, with external ip it connected

        when upload it to aaPanel, there is no connection to database

        you can check the api here https://app1.jadidalmagribi.com

        and cannot requesting the data https://app1.jadidalmagribi.com/student/get

        here is local external connection

          almagribi
          Please use the command to check if the database exists?
          Log in:
          su - postgres

          enter the database
          psql

          Check out the database:
          \l

          View all database information
          SELECT * FROM pg_database ORDER BY datname;

          quit
          \q

          I havent tried it, but it can restore database using remote database. I have ALTER USER nibs TO SUPERUSER;, Still it cannot connect to database from local,