U
U
uurg2022-01-13 18:03:32
Node.js
uurg, 2022-01-13 18:03:32

How to make an admin panel for a website?

Good afternoon.
Essence of the question - I'm getting ready to write a site frontend vue.js, backend express. And the question arose of how to properly separate the public part of the site and the admin panel.
A picture appeared in my head that it would be necessary to make two separate vue applications, and redirect the user through the back depending on where he needs to go. But, unfortunately, there is not enough understanding of how to implement it. The assembled site on vue has a "static" index.html, which is displayed on node.js (app.use(express.static({path})), but did not figure out how to do it if there are several of them.

Perhaps it is generally worth combining the admin and the site itself together and separating them using a session.It
might be better to abandon such a bundle, and completely switch to conditional Nuxt.js, if it is easier to implement there.
And one more question, how do they usually hide the admin panel from a regular user? That is, conditionally, if he goes to site.com/admin, he did not open the login form, but redirected to, say, the main page.

In general, please share your opinion, as this is my first experience (with the admin panel). I will be glad to any advice.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
David Chuck, 2022-01-16
@Chaki09

Good afternoon! Make separate applications, best of all in a mono-repository, use https://github.com/bripkens/connect-history-api-fa... on the back for publishing statics , in which you set up your redirect.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question