Is there any way to use express or other nodejs librarys to to design an api and deploy it pasting files as a resource path in a web server just like react.
My web server just listen on ports 80 and 443. I have pages on domain.com/page1 domain.com/page2. and i want to deploy an api listening on domain.com/page3 but i cant install a nodejs server and proxy requests to page3 to it.
Thanks a lot
There can be only one web server listening on a given port. You can directly "listen to a path", only a port.
So, if you already have an existing web server running on ports 80 and 443, then these are your options.
http://yourdomain.com/page3 and https://yourdomain.com/page3 directly with your API.http://yourdomain.com/page3 that will redirect requests to your http://yourdomain.com:3000/page3 Express-based API server.http://yourdomain.com:3000/page3.http://yourdomain.com/page3 and https://yourdomain.com/page3 to the separate port that your Express-based API server is running on.