Create A Free Web Server on Your Android Device With lWS

in #utopian-io5 years ago

​ I am sorry to say that not everyone reading this would be interested in this review. The reason being that the project I will be reviewing today is related, or known to be a tool for developers. However, if you're not a developer but would love to read through, or on behalf of a developer, then, I promise to introduce the project the best way I can.


What Is A Web Server?

The term "Web server" won't be strange to developers especially web developers. When I checked Google for the definition of the term, wikipedia defined it as "A web server is server software or hardware dedicated to running said software, that can satisfy World Wide Web client requests. A web server can, in general, contain one or more websites. A web server processes incoming network requests over HTTP and several other related protocols. "

From the definition given above, you'd have understood that a web server is a hardware that contains one or more websites. A web server is also said to be a server software. When I checked for the image of a web server, one of the best images I was able to choose from Google is shown below.


source

The image above is detailed with the information of how a web server communicates with a web browser. After I looked at the images of a web server, I have to conclude that they are large, expensive, or difficult to maintain. These were the issues some developers aimed at solving before they finally developed an Andriod application that turns Android devices into a web server.

In today's review, I will be introducing to you an Android application that turns an Android device into a web server. This type of technology isn't new. In fact, there are several types of applications that are able to create a web server on an Android device. But the only one I have used is lWS.

Introduction To lWS

lWS is a project by an Android developer with a Github profile name as Mvasov. He stated on the project's ReadMe file that lWS is a fork from another open source project which has not been updated or maintained for about 5 years as of when I was writing this post. Mvasov defined his forked project (lWS) as a "lightweight Web Server (lWS) for Android".

Below are the two links to download the latest version of lWS.

Available on Google Play

Available on F-Droid


After I read that lWS is an application that enables users to create a web server on their Android device, I was expecting it to request the permissions to access my device storage. But, it was a different case with lWS. lWS is one of those projects I have used that functions as intended without having to request for user permission.

I was so surprised by this feature. I needed to know if this is how every other web server tools works. And that to be possible, I searched and downloaded a similar application known as Http Server. On launching it, the very first thing that displayed was the permission to access my media files. After this permission was expected, its homescreen then displayed.

Below are the screenshots from the two apps. The first screenshot is an interface of lWS, while the other two are for Http Server.

ser.png

Facts About The Permission Requests

After I launched and used lWS, I was glad that it didn't ask for permission to access my media files. But, I wish it did. Because it later requested me to download an external application to access my media files. If it had requested to access my media files, I won't be asked to download an external application. Although, this option isn't mandatory.


HomeScreen

If you've been constantly reading my reviews, then, by now, you should know that I'd prefer to use an application with a dark interface to that which has a white interface/theme. lWS has my best theme color, while Http server doesn't. The other reason why I love lWS interface is the way the developer made the right choices of colors. Its homescreen consists of Black background, White, and yellow texts.

The other reason I love lWS's homescreen is how the buttons and the texts are arranged. The developer also managed not to use the whole screen for buttons, and texts, by using the remaining parts of the screen for activity logs screen. In fact, the first activity it logged was the Index file it automatically created. The activity message was one of the texts displayed after I launched it.

The homescreen of its competitor isn't bad either. In fact, it has two buttons only, while the rest of the screen remained empty and useless.


Starting A Web Server

On launching lWS, it doesn't only display its homescreen or the index file as explained above. It also created a private directory automatically. The directory path is part of the texts displayed on its homescreen. The path info is written in yellow color. You can view the first screenshot below.

I was able to see the Html Index file it created when I located the directory with my file manager.

lWS

Http Server

By default, the web server address displayed to be "not running". This simply means that the app is not running. The status of the web server address changed after I clicked on the Start button. Also, the three buttons (Send, Qrcode, Browser) became clickable.
If in case you didn't notice that it wasn't clickable, you can view the previous screenshot in the paragraph, and then compare it with the screenshot in this paragraph.

The most important part of a web server is the local IP address, and port. After I started the server, It assigned 192.168.43.121 as my IP address and a port of 8080. The address and port will be used to access the HTML index file in the directory.

At this point, I noticed that it had already converted my Ip, and port into a web server address (it's displayed on the log screen). When I accessed the address, it opened the content of the Html Index file.
At first, I copied the web server address (URL) into my Chrome browser. I never knew that I could have simply clicked on the browser button on lWS to open the Html Index page automatically.

The second screenshot above is an interface from its competitor app. The app shows that it's running, and it displayed the same Ip, and port as my web server link. When I clicked on the link, it loaded the same Html index file.

The two interfaces are easy to use because of how they reduced the stress of letting users to manually copy the web server address into a browser (they provided a button to open the web server address).

Testing My New Web Server With A New Web Page

After it successfully opened the Html Index file, I then decided to change the content of the index file into steemit search page HTML code. Below is the code for anyone that wants to test the web server app with the exact code I used. I got the code from Steemit GitHub repo.

<html lang="en">
<head>
    <meta charSet="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="icon" type="image/ico" href="/favicon.ico" />
    <title>Search - steemit.com</title>
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.2.1/foundation-flex.css">
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
    <style>
        html {
            font-size: 105%;
            box-sizing: border-box;
        }
        body {
            font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
            line-height: 1.6;
            background-color: #fcfcfc;
        }
        div.top-bar {
            padding: 0;
        }
        .top-bar div.row {
            margin-left: 0;
        }
        a {
            color: #1a5099 !important;
        }
        .gsc-control-cse * {
            box-sizing: content-box;
        }
        .gsc-control-cse input {
            box-shadow: none !important;
        }
        table {
            border-collapse: inherit;
        }
        table tbody td, table tbody th {
            padding: inherit;
        }
        .header {
            border-bottom: 1px solid #e6e6e6;
            position: fixed;
            backface-visibility: hidden;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 100;
            background-color: #fefefe;
        }
        .top-bar, .top-bar ul {
            background-color: #fefefe;
        }
        .menu li {
            display: list-item;
            padding: 0;
        }
        .menu li > a {
            display: flex;
            line-height: 1.5rem;
            font-size: 1.1rem;
            padding: 0.7rem 1rem;
        }
        .menu li.logo {
            padding: .35rem 0 .35rem 0;
        }
        .menu li.logo > a {
            padding: 0;
        }
        .beta {
            position: relative;
            top: 14px;
            right: 22px;
            font-size: 0.7rem;
            color: #788187;
        }
        .Icon_2x > svg {
            height: 2rem;
            width: 2rem;
        }
        div.search-content {
            margin-top: 3rem;
            margin-bottom: 3rem;
            border: 1px solid #eee;
            background-color: white;
            padding: 2em 0;
            box-shadow: 0 2px 4px 0 rgba(0,0,0,0.03);
        }

        .logo-new {
            transition: 0.2s ease-in-out;
            width: 144px;
            height: auto;
            display: block;
            height: auto;
        }    
      .logo-new .icon-svg {
          fill: #06D6A9;
          transition: 0.2s all ease-in-out;
      }
      .logo-new:hover .icon-svg {
        fill: #171F24;
      }
      .search.header {
        padding: 8px 0;
      }

    </style>
</head>
<body>
<div class="top-bar search header">
    <div class="expanded row">
        <div class="columns">
            <ul class="menu">
                <li class="logo">
                    <a href="/">
                    <svg class="logo-new" width="148px" height="38px" viewBox="0 0 148 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
                    <title>Steemit Logo</title>
                        <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                            <g class="icon-svg" fill-rule="nonzero">
                                <path d="M49,24.015935 C49.4429506,26.9151335 51.8962153,28.6681372 55.43982,28.6681372 C58.8471321,28.6681372 61.33447,26.8477103 61.33447,23.8810886 C61.33447,21.689834 60.0396914,20.2402347 57.4501341,19.6334258 L54.2472607,18.8917704 C53.1569208,18.6220775 52.6798971,18.1838265 52.6798971,17.5095944 C52.6798971,16.329688 53.9065295,15.7903022 55.0990888,15.7903022 C56.6664524,15.7903022 57.5523535,16.4645344 57.8590116,17.4421711 L61.1981775,17.4421711 C60.6870807,14.7115307 58.6767665,13.0259503 55.1331619,13.0259503 C51.8280691,13.0259503 49.4088775,15.0149352 49.4088775,17.711864 C49.4088775,20.1728115 51.0103142,21.3190062 53.1569208,21.8246804 L56.291648,22.5663358 C57.5523535,22.8697403 58.0634503,23.3079913 58.0634503,24.1170699 C58.0634503,25.2969762 57.0412567,25.9037852 55.4738931,25.9037852 C53.9746757,25.9037852 52.8502627,25.2632646 52.4754584,24.015935 L49,24.015935 Z M65.4573177,24.2856279 C65.4573177,27.2522496 67.3654125,28.6681372 70.0571891,28.6681372 C71.1134559,28.6681372 72.0334302,28.4658675 72.6126732,28.1287514 L72.6126732,25.060995 C72.1356495,25.3981111 71.3519677,25.6678039 70.6705053,25.6678039 C69.5460923,25.6678039 68.8646298,25.1284182 68.8646298,23.9148002 L68.8646298,16.16113 L72.271942,16.16113 L72.271942,13.3630664 L68.8646298,13.3630664 L68.8646298,9.35138478 L65.4573177,9.35138478 L65.4573177,11.0538211 C65.4573177,11.2294024 65.4573177,11.439697 65.4573177,11.6847049 C65.4573177,12.8974247 64.4479015,13.3630664 63.7557912,13.3630664 C63.2943843,13.3630664 63.0665204,13.3630664 63.0721992,13.3630664 L63.0721992,16.16113 L65.4573177,16.16113 L65.4573177,24.2856279 Z M140.737621,24.2856279 C140.737621,27.2522496 142.645715,28.6681372 145.337492,28.6681372 C146.393759,28.6681372 147.313733,28.4658675 147.892976,28.1287514 L147.892976,25.060995 C147.415953,25.3981111 146.632271,25.6678039 145.950808,25.6678039 C144.826395,25.6678039 144.144933,25.1284182 144.144933,23.9148002 L144.144933,16.16113 L147.552245,16.16113 L147.552245,13.3630664 L144.144933,13.3630664 L144.144933,9.35138478 L140.737621,9.35138478 L140.737621,11.0538211 C140.737621,11.2294024 140.737621,11.439697 140.737621,11.6847049 C140.737621,12.8974247 139.728205,13.3630664 139.036094,13.3630664 C138.574687,13.3630664 138.346823,13.3630664 138.352502,13.3630664 L138.352502,16.16113 L140.737621,16.16113 L140.737621,24.2856279 Z M85.2112099,23.6788189 L88.3459371,23.6788189 C87.8348403,26.6454406 85.6200874,28.6681372 81.9742634,28.6681372 C77.7491963,28.6681372 74.8189078,25.4992459 74.8189078,20.8807553 C74.8189078,16.3971113 77.7832694,13.0259503 81.9061171,13.0259503 C86.1652573,13.0259503 88.4822296,16.0262835 88.4822296,20.4087928 L88.4822296,21.6224107 L78.1580738,21.6224107 C78.2602931,24.2519163 79.7935836,25.836362 81.9742634,25.836362 C83.6097732,25.836362 84.8364056,25.1284182 85.2112099,23.6788189 Z M81.9401902,15.8577255 C80.0661685,15.8577255 78.6691706,17.0039202 78.2602931,19.1614632 L85.1089905,19.1614632 C85.0749174,17.3410363 84.0186507,15.8577255 81.9401902,15.8577255 Z M100.952992,23.6788189 L104.087719,23.6788189 C103.576622,26.6454406 101.36187,28.6681372 97.7160455,28.6681372 C93.4909785,28.6681372 90.5606901,25.4992459 90.5606901,20.8807553 C90.5606901,16.3971113 93.5250516,13.0259503 97.6478993,13.0259503 C101.907039,13.0259503 104.224012,16.0262835 104.224012,20.4087928 L104.224012,21.6224107 L93.8998558,21.6224107 C94.0020751,24.2519163 95.5353656,25.836362 97.7160455,25.836362 C99.3515552,25.836362 100.578188,25.1284182 100.952992,23.6788189 Z M97.6819724,15.8577255 C95.8079509,15.8577255 94.4109529,17.0039202 94.0020751,19.1614632 L100.850773,19.1614632 C100.816699,17.3410363 99.760433,15.8577255 97.6819724,15.8577255 Z M118.428244,15.0149352 C117.644563,13.8687405 116.145345,13.0259503 114.441689,13.0259503 C112.738033,13.0259503 111.375108,13.6664708 110.659573,14.6103959 L110.659573,13.3630664 L107.25226,13.3630664 L107.25226,28.3310211 L110.659573,28.3310211 L110.659573,18.2849614 C110.966231,16.8016506 112.124717,16.0599951 113.351349,16.0599951 C115.020932,16.0599951 115.838687,17.2736131 115.838687,19.1277516 L115.838687,28.3310211 L119.245999,28.3310211 L119.245999,18.2849614 C119.552657,16.8016506 120.711143,16.0599951 121.937776,16.0599951 C123.607359,16.0599951 124.425114,17.2736131 124.425114,19.1277516 L124.425114,28.3310211 L127.832426,28.3310211 L127.832426,18.5883659 C127.832426,15.1834933 126.02655,13.0259503 122.925896,13.0259503 C120.881509,13.0259503 119.484511,13.8013173 118.428244,15.0149352 Z M135.247589,13.3209268 L131.840277,13.3209268 L131.840277,28.2888816 L135.247589,28.2888816 L135.247589,13.3209268 Z M135.673503,9.10697561 C135.673503,7.93259576 134.677414,7 133.543933,7 C132.410452,7 131.414363,7.93259576 131.414363,9.10697561 C131.414363,10.2813555 132.410452,11.2139512 133.543933,11.2139512 C134.677414,11.2139512 135.673503,10.2813555 135.673503,9.10697561 Z" class="icon-svg__shape"></path>
                                <path d="M32.7004951,11.3807248 C31.1310771,9.81140963 29.3043776,8.66313021 27.3619013,7.92312792 C28.4939405,4.59311764 32.5075339,3.38104493 32.5075339,3.38104493 C32.5075339,3.38104493 23.1424826,-1.48000457 12.7997611,0.459311764 C9.35218721,1.00793415 6.0461183,3.12587173 3.62767097,5.92001831 C-1.62087426,11.9803819 -0.926213868,21.1028239 5.18422484,26.3083572 C6.1233028,27.1121528 8.22014805,28.3625014 8.2587403,28.4262947 C6.8822836,31.9221676 2.48276772,32.8790671 2.48276772,32.8790671 C2.48276772,32.8790671 8.29733255,36.5152853 16.10583,37.4594261 C18.1769471,37.7145993 20.3767051,37.7783926 22.6536475,37.5359781 C26.2684544,37.2425289 29.8703972,35.3287299 32.6104465,32.6366526 C38.5407881,26.7931863 38.5922444,17.2752258 32.7004951,11.3807248 Z M30.0247661,30.3145765 C27.8121441,32.4835487 24.5060752,33.861484 21.9589871,34.0528639 C20.1580157,34.2314851 18.2284034,34.2570024 16.3759757,34.0273465 C13.6487905,33.6956214 11.680586,32.9428604 9.75097374,32.2156168 C10.7286439,31.271476 11.7063141,29.9700926 12.1051006,28.8473305 C12.3623823,28.1838802 12.3366541,27.4438779 12.0279162,26.7931863 C9.95679906,22.5317938 10.8572848,17.4283297 14.2662664,14.1110781 C16.73617,11.6996913 20.1322875,10.5641706 23.5798614,10.9852064 C26.1140854,11.2914142 28.416756,12.4014176 30.2177274,14.2003887 C34.5915151,18.5893678 34.4371461,26.014908 30.0247661,30.3145765 Z" class="icon-svg__shape"></path>
                            </g>
                        </g>
                    </svg>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="row medium-8 large-7 search-content">
    <div class="columns">
        <br />
        <gcse:search linktarget="_self"></gcse:search>
    </div>
</div>
<script>
    (function() {
        var cx = '011445933062884569876:-jmpkfnkicw';
        var gcse = document.createElement('script');
        gcse.type = 'text/javascript';
        gcse.async = true;
        gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(gcse, s);
    })();
</script>
</body>
</html>


Below is a gif showing how I accessed the new Index file page (Steemit search page) with the Browser button on lWS's homescreen.

The Settings Page

From the screenshots provided in the previous paragraphs, There's a button on the homescreen titled as Settings. After I clicked on it, it opened the preference page. From this page, users are able to configure just two things. And they are;

  • Document root
  • Port

While in its competitor's app, there's a tab with the same title. After I clicked on this tab, it then opened a similar page to that of lWS 's. Below are the screenshots to the interfaces.

lWS

Http Server

The only similar options between these interfaces are the option to change the Document root and the listening port number.

When I clicked to change the Document root on lWS, it displayed an interface to edit it manually. But when I tried the same thing with Http Server, it was able to read my storage and made it easier to select a new root folder. It was possible to seamlessly select a new root folder because of the permission it requested after I installed it.

I'd have loved to choose Http Server over lWS because of this feature. But, lWS has an extra option that is titled "Use OI File Manager". With this feature, I was able to change the default document root folder the same way as Http Server did.
Note: You will have to download the file manager if you do not have it.

The Send Button

One of the important buttons that are missing on Http server is the Send Button. Apart from the fact that users are able to click on the web address server to open the HTML index file, it'd be nice to also have an option to share the address with other users, or applications.
lWS has this option and I appreciate the developer for adding it.

The Qr code

Apart from the feature that enables users to share their web server address with other apps, lWS is also able to encode the web server address into a QR code. This is a brilliant idea that is also missing on its competitor's app. The QR code feature is easy to use because it encodes the web server address automatically. Although, the feature requires users to install an external app known as lWS Qr.


Project Update

The latest version of lWS was released 17days ago as of when I was making this post. The only two noticeable updates are;

  • Disable annoying notification sound

  • Fix screen state when the server stopped from notification

Conclusion

I am impressed by how lWS functioned. it'd definitely be the right app to recommend to anyone searching for a portable, free, and easy to use app that turns an Android device into a Web Server.

Sort:  

Hello, @rufans!

Thank you for your contribution. This is an amazing tool; the option to turn one's mobile device into a web server sounds really cool, and it only goes to show how far technology has come. All I need is to download the app, and I can establish my very own server. Sweet!

Once again, you managed to compose a very informative review. The post contains vast amounts of information about the project, and the content is unique. It is obvious that you have a broad understanding of the subject, and this makes your contribution enjoyable to read. However, there were minor writing imperfections, and I would be happy to cite a few of them in a follow up comment, if you wish.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @lordneroo! Keep up the good work!

Hi @rufans!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @rufans!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Hi, @rufans!

You just got a 3.73% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 63960.62
ETH 3142.95
USDT 1.00
SBD 3.95