Answer the question
In order to leave comments, you need to log in
How to specify the root directory for the server in NodeJS?
Good afternoon, ladies and gentlemen!
How can I specify for NodeJS the root directory that should open when the page is opened, for example, localhost:8080 ?
At my default address, the Windows system folder opens, although the server file is in a folder on the desktop. And I just need this folder, in which the file is located, to be the root.
I'm using the NodeJS server code from the AngularJS Learning archive from here - https://github.com/angular/angular-phonecat/blob/m...
Answer the question
In order to leave comments, you need to log in
In environment variables you can set NODE_PATH
nodejs.org/api/modules.html here is everything you need
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question