Simple http server for file sharing in same network.Feb 06, 2019 · 1 min
If you have multiple devices and constantly need to share files between the devices then its quite hassle to find thumb drive. Using simple http server you can excess/transfer your file to another device in no time with these simple command.
What you need?
- Node JS install on your machine.
- 3 Simple Command to start server
- Ready to go
Installing Node JS.
For windows userYou can install Node JS from the link here
For Mac userGo to the link above and install the setup files here or View this tutorial
For Linux userOpen the terminal and run this command.
sudo apt update
sudo apt install npm
sudo npm -i -g n
sudo n stable
Installing http-server package from npmOpen terminal or command line tool and check if node is installed or not.
node -vwill print version. current version is v9.11.2
npm -vwill print current version is 6.7.0
Installing npm package from npm.
npm i -g http-server
You can use
sudoif you are linux or Mac user
Serving the folder over httpThen navigate to the folder you want to share over your network using terminal/command line tool in that folder.
npm http-server -p 5656
Now you can open the address
192.168.100.15:5656 in another device browser such as chrome/ firefox and your
browser will show files contain in the folder. In my case
files in foldertoshare in desktop.