I have an api running on localhost how do I send it to my ftp? I have these folders, I downloaded with composer the slimframwork just send everything?
The way you have organized folders and index.php
, is to send the contents of the BackEnd folder via FTP to the root folder of the HTTP server.
On SHARED and VPS servers it is usually the public_html
folder, sometimes htdocs
or www
It is not necessary to send the git
(and nor should ) folder, also note that perhaps the vendor
folder and class
folder would be better off public_html
), because eventually depending on what is put in them there is a remote possibility that something can be executed when it should not, which can cause problems, such as BUGs or even possibly some security flaw.
However if you have been installed via the skeleton command line with composer
, for example:
composer create-project slim/slim-skeleton [pasta-projeto]
The root folder would be public
, so the schema to use would be more or less this:
/home/user/
|--- /vendor
|--- /class
+--- /public_html (pasta padrão em servidores com cpanel)
|--- index.php (arquivo da pasta [pasta-projeto]/public)
+--- .htaccess (arquivo da pasta [pasta-projeto]/public)