Background:
I am developing a Web application for Employee Management. I use Laravel for building a RESTful API, and (maybe) ReactJS for the frontend.
My problem:
I am confused on how to deploy my application. My current plan is to use the command Laravel artisan serve for the RESTful API, and use Nginx for serving HTML files. But is Laravel artisan serve possible for production? How to serve RESTful API?
Some other thoughts:
As far as I know about Node.js applications. We can use ExpressJS for building a RESTful API, then pm2 start app.js for production. But Node.js is good at serving dynamic contents. If I build the RESTful API with Laravel or Spring Boot, or Ruby on Rails (Sinatra), I don't think a command like pm2 start app.php (app.java or app.rb) will work (here pm2 is only for convenience, I know it is only for a Node.js app) because PHP, Java or Ruby is quite different from Node.js. I am afraid I am missing something fundamental here.