How to share files without using shareit or any other sharing app

Sushil Bhardwaj
2 min readJul 11, 2020

Hello Everyone, In the previous post, we learn how to run node.js express server in android smartphones. You can check by clicking this link here.

In this blog, we are going to learn how to share data without shareit or any other sharing app. It is very easy to share files over the network you can write your own script or you can use http-server it is a simple, zero-configuration command-line http server. We can start sharing files over the network by using these three easy steps.

  1. Installation and configuration
  2. Basic command
  3. How to use

1. Installation and Configuration

Go to playstore search for termux or click on this think termux it will automatically redirect you to playstore. Install the app and then type the following commands in order to install the latest packages.

$ pkg update && pkg upgrade$ pkg install nodejs$ npm install -g http-server

After the successful installation of packages, you have to give storage permission to the app so, go to settings > app management > termux and then allow storage permission. Now we are done with the installation and configuration part. Now it’s time to give a shot.

2. Basic Commands

Before start sharing any data make sure you are connected on the same network ( create a hotspot and connect ). At this movement, you can start sharing files over the network by typing the following command

$ http-server /sdcard

remember to specify the path otherwise, it will start the server at your current working directory.

You can download the files by visiting the IP addresses in your favorite web browser.

3. Pro tips :)

  1. Stream videos over the network
  2. Share data from PC to mobile or mobile to PC
  3. Test your SPA frameworks build

--

--