Local Development | LAN [ Local Area Network ]

Local Development | LAN [ Local Area Network ]

Before an application, website, backend server, frontend app or any application required to integrate with another platform, how you work with your friends?

  • Put all in one computer for testing?
  • Upload to a free hosting for testing like Heroku ?

If your team able to work in same place, i would suggest hosted own local network for testing at least faster then using other free platform like Heroku.

As of improvement of technology, nowadays network interface card ( NIC ) would have a feature about HostedNetwork. You can host your local area network ( LAN ) for your friends and they can access your works and testing at their own computer and fix would faster the development.

netsh-show-drviers-hosted.jpg

In Windows

You can use command prompt and type "netsh wlan show drivers" and check is "Hosted network supported : ". If supported you can create your local area network by using command "netsh wlan set hostednetwork mode=allow ssid=YourAP key=YourPW".

  • YourAP = Access point name
  • YourPW = Password you want to share

In Linux

You can use " create_ap " package for sharing hosted network.

Here my bash for sharing:

#!/bin/bash

printf "Setting up for Local Hosted Network\n\n"

interface_name=`iw dev | awk '$1 == "Interface"{print $2}'`

printf "=======================\n"
printf "Wifi Interface Name: \n";
count=1;
for i in $(echo $interface_name | tr ";" "\n");
do
    printf "  $count. $i\n"
    ((count++))
done;
printf "=======================\n\n"

printf "  Input your Interface Name : "
read interface
printf "  Input your AP : "
read ap 
printf "  Input your Password : "
read pw

printf "\n"
printf "Your local hosted network will be hosted using\n"
printf "    Interface  : $interface\n"
printf "    AP         : $ap\n"
printf "    Password   : $pw\n"
printf "\n"

sudo create_ap $interface $interface $ap $pw

When you connected

  • You can access the main hoster via the default gateway in windows and the last number would be 1, hoster would be first to connect the access point. Example of IP Address look like "192.168.12.1".

With the LAN, You can

  • Play games with friends
  • Access web server
  • Access backend server

Here come with an example using my phone to access backend application:

49854807_996232653919048_5603351030285729792_n.png