Thursday, May 4, 2017

Easy way to share file in network (For Node JS Lovers)

In my workplace, most of the times I've to share my files with my co-workers. There are several ways to do it,
  • use external HDD 
  • share through network
How if we forget to bring our external HDD...
Second choice is share through network. But we need to do lot of configurations. If you are not tech guy, it make really mess. 



Easiest way for Nodejs users...

First you have to install Node JS, if you haven't installed yet. 

Then install http-server module globally.
npm install -g http-server
In ubuntu or linux PC you have to run previous command with super user(sudo).



If you done, next you have to go to your share folder which you want to share through network. As an example I need to share my picture folder through network.



Then run following command to start the file server.
http-server



You have already done it.

Finally....

You can go the URL which display in console. As previous screenshot 'http://***.**.42.39:8081/' is the URL which allows to access files from different PC in network.

Next you have to type given URL in another PC's web browser. Now you can click what you want to download from the host PC.




Location: Colombo, Sri Lanka

0 comments:

Post a Comment