I need to connect a API REST
to a database. I currently have a api
in the hosting heroku
with all its implementation configured with slim
and swagger
. This application is connected to a database phpmyadmin
. In local works perfectly, the problem is that when I upload it to heroku
I can not connect it to the database. How can I create a database in Heroku
in the free version? After a long search on the internet I found that there is an application called ClearDB MySQL
that must be installed in add-ons. In my case I can not install it because I have the free version. To connect the database I have created the following variables within Heroku
:
-
DATABASE_CHARSET
-
DATABASE_DRIVER
-
DATABASE_HOST
-
DATABASE_NAME
-
DATABASE_PASSWD
-
DATABASE_PORT
-
DATABASE_USER
When I make any request with the server, I get the following error of Slim
:
In this url you can see my app. Also, when I send requests to the server through swagger
I always get the error 404
of HTTP
( swagger ).
Any solution?