-1

I have a question.

What are the methods to protect node.js javascript files (those run by server, not client). I would not like them to be visible to public in any way.

Any ideas? Permissions, auth, encryption?

asked Dec 22, 2012 at 22:34
1

1 Answer 1

4

Files that are running on the server are not directly accessible by the client. That should be enough protection. The client never has direct access to the server side scripts, only to the result they produce which is sent to their browser (or whatever they are using to query your server). So you should really not be worried about your javascript files that are run by node.js on your server.

answered Dec 22, 2012 at 22:35
Sign up to request clarification or add additional context in comments.

3 Comments

Yes, but if I have a file called something.js in domain.com/something.js, wouldn't accessing that link open the file?
No, it won't if you have Node.js running on the server that will execute this file.
Just to be safe I think I won't place it in www. Or should I just use .htaccess to not allow access to read any files from web?

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.