E
E
Eugene2019-04-25 00:42:17
Node.js
Eugene, 2019-04-25 00:42:17

How to properly organize the file structure of the express server?

Faced the problem of proper organization of the server file structure. I have a /public folder which contains js, css and png files. They are given using the command Where and in what structure should the html files of the pages be placed? At the same time, pages like home, about, etc. should be available to everyone, and profile and adminpanel only to authorized users with the appropriate access rights.
app.use(express.static(__dirname + "/public"));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-04-25
@rockon404

Routes and controllers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question