Answer the question
In order to leave comments, you need to log in
How to correctly set up Express.js routes on a dedicated server with Nginx?
At the moment, the server is configured to run the application, api and phpmyadmin.
Implemented via proxy_pass like this:
Application - /
When - /api
Phpmyadmin -/phpmyadmin
The problem occurs only with api.
The application and php work.
Express.js is connected to the database correctly, requests are being processed, but the routes are not working.
When the application calls the api, the response is html with a text like CANNOT GET /smt.
Having studied many forums, I did not understand where and how the error occurs.
How to make api routes work :( API
link: https://gitlab.com/fateseekers/gipp_api
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question