How to work offline?

I’m travelling, thought I’d do some coding on the plane. Run ionic serve and it tells me it won’t work without a network connection. I can’t have a network connection on the plane - is there any work around?
I have a couple of hours layover now, so any quick solutions could help me productively kill time on the next leg :slight_smile:

According to the cli help for ionic serve I should be able to use the --nolivereload or -d flag
That doesn’t appear to work either though

ionic serve --nolivereload
Error: It appears that you do not have any external network interfaces. In order to use livereload with emulate you will need one.

Are you on the latest Ionic CLI?

Dont tell anyone: i put the wifi on, setup a hotspot with my phone, launch ionic and almost directly after it can switch all off again.

Bit silly check in ionic I would say as I can work flawlessly in the plane that way

1 Like

@Tommertom does livereload continue to work after you disable the hotspot?

Luckily the second flight had an in-flight wifi entertainment hotspot so I was able to work using that. I have more flights coming up in a few days, then the return trip in a couple of weeks so it would be nice if I could find a decent working solution.

@Sujan12 - Yep

cli packages: (/Users/mbeckett/sites/apps/wordsearchwar/node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

global packages:

    Cordova CLI : 6.5.0

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.6.0

System:

    ios-deploy : 1.9.1
    ios-sim    : 5.0.3
    Node       : v6.11.0
    npm        : 3.10.10
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.3 Build version 8E3004b

Livereload uses a server running on your computer that triggers a reload of the pages, that are then also loaded from your computer. So you definitely need the device and computer to be on the same Wifi.

Hi @beck24,

Livereload works like a charm after shutting off the wifi. So the wifi on time (and hotspot) is almost 5 seconds. So great offline coding.

Loving it: 8 hours nonstop coding with headphones on, entertainment system on a movie, a drink. Ultimate me-time!

Regards

Tom