Answer the question
In order to leave comments, you need to log in
Where to keep the admin panel in a React + Node JS application?
I am making one small site for one clinic, where I need to attach the admin panel (I decided to install React-admin).
The project has a client folder where the whole front. And now I don’t know how to properly integrate the admin panel. Create a separate folder for it outside the client folder, and run it on a separate port, or embed it in the front and access it through the site itself via app.com/admin?
How correct is it from a security point of view when the admin panel is essentially located inside the site?
It's just that once I worked in a team on one project, where the entire admin area was essentially a separate site outside the application.
Answer the question
In order to leave comments, you need to log in
A public site for the clinic - I would run the admin panel on a separate port. For it is difficult to imagine that everyone in the clinic is experienced users who care about safety. Moreover, most likely, not a system administrator will have access to the admin panel, but also some director / deputy director of the clinic, which even Habr does not read.
Ideally, do not let the admin panel outside at all, and allow access only from the clinic's local area or via a separate VPN
You do not refund the amount.
In the first case, you return the function, not the result of its execution.
In the second, you're executing a returned function that doesn't return anything.
Rather, it returns, but the default value is undefined.
Your code works exactly as written.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question