Open 1fifoto opened 4 years ago
Considering rewriting our current server into PHP so it can run as odop/api/index.php under a standard Apache HTTP Server such as those provided by Dreamhost web hosting services.
composer require bramus/router
. which is "A lightweight and simple object oriented PHP Router" similar to NodeJS express. See: https://github.com/bramus/router. See also: https://packagist.org/?query=bramus%2Froutercomposer install
to install all required packages.require 'vendor/autoload.php';
While doing other things I found API Platform Core which is an easy-to-use and powerful library to create hypermedia-driven REST APIs. It says it can build a working and fully featured CRUD API in minutes. See: https://api-platform.com/docs/core/getting-started/
This doesn't seem possible. See: https://stackoverflow.com/questions/54325397/how-to-connect-mysql-database-to-reactjs-app
Also See: https://help.dreamhost.com/hc/en-us/articles/214869648-Persistent-processes. Which suggests that we cannot run a NodeJS server on a Dreamhost site concurrently along with the Wordpress/Apache server installation.
From: https://help.dreamhost.com/hc/en-us/articles/217185397-Node-js-overview Is it possible to run Node.js on ports 80 or 443? Yes, but only if you've enabled Passenger in the panel and the file to load your application is named app.js. View the following article for further details.