I'm new to backend and I've written a python script which imports libraries like Flask
, sqlalchemy
. From taking help from here and there I've been successfully able to get JSON as response to a get call using localhost
or http://127.0.0.1/
.
Now that this is done I want to take this action on a live server so right now I've hostgator and I've created a folder there so it'll be like mydomain.com/api/
. Now my questions is that do I need to place an index.html
in this folder which makes a call to run myscript.py
or I can directly call mydomain.com/api/myscript.py
and it'll return the JSON?
My script is basically a recommendation model that returns recommendations to users upon request.