S
S
SpeNch2021-02-20 22:54:43
Node.js
SpeNch, 2021-02-20 22:54:43

How to prevent viewing a server file?

I have a code in node js
app.use(express.static(__dirname));

And when I go to the search bar on the server.js file, all the code is visible to me, how can I prevent viewing the server file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DeityLamb, 2021-02-20
@DeityLamb

place static files in the public folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question