Local area network file sharing
A simple way to share files across a local area network
view on


lan.js is simple a Javascript file which runs under node.js which runs a local server that's accessible through private network and loopback IPs. A directory is specified to the application, and it will serves the files in the directory over HTTP.

It's also useful for testing webpages which may be required to not be a file: URI to work.

Required software



If you're using Windows, select the “Package” download above and unzip it to a folder. You can place files inside the included “files” folder and they will be easily served.

To start the server: double-click run.bat
To close: close the command window, or CTRL+C inside of it if you like

To access the server while it is running, go to one of the following urls: assuming the server is using port 80

Network addresses will be listed on lan.js startup. Pick any address not labeled “external” to use for connecting.

If you're using another operating system, reading the contents of run.bat and porting it to a different shell language should be fairly simple.


The following are the basic editable settings that appear in run.bat. They can be changed if desired or required.