Skip to content

Repository for the talk ""Write once, run anywhere" with nw.js & Cordova: for real!" from Christian Weyer and Manuel Rauber at Angular Connect 2015.

Notifications You must be signed in to change notification settings

thinktecture/angular-connect-2015-write-once-run-anywhere

Repository files navigation

Sample application based on Angular 1.4, AdminLTE - with Cordova and nw.js

Template for live coding is in live-coding-template branch.

Requirements

Setup

Building

The gulp task will build iOS, Windows Phone, Android phone apps as well as desktop apps for Mac OSX, Windows and Linux. To get it working, please do the following:

  • Only after cloning the repo: npm i within the root folder of this repository
  • Live reloads:
    • Run gulp dev:livereload to start a live server, which is best when developing the app
    • Run gulp nwjs:watch and within nwjs-folder nw . for nwjs live reloading
    • Run gulp cordova:watch:ios and within the cordova folder cordova run ios for cordova live reloading (only works for iOS, not for Android or Windows Phone)
  • Run gulp to build all apps in release mode (will execute gulp build:all:release)
  • Debug Mode: Use the following gulp tasks to build the apps in debug mode
    • Run gulp build:all to build all apps in debug mode
    • Run gulp dist:default to build the web app in (and use static within the dist/ folder to explore the app)
    • Run gulp cordova:default to build all phone related apps
    • Run gulp nwjs:default to build all desktop related apps
  • Release Mode: Use the following gulp tasks to build the apps in release mode
    • Run gulp build:all:release to build all apps in debug mode
    • Run gulp dist:release to build the web app in (and use static within the dist/ folder to explore the app)
    • Run gulp cordova:release to build all phone related apps
    • Run gulp nwjs:release to build all desktop related apps

Usage

  • To login just use username = password (eg. user: bob, password: bob).
  • If you don't want to use the Azure Web API, you can run the server by yourself by starting the BoardGame.Host project with Visual Studio and change the url within the AngularJS app. The server will run on port 8080.
  • If starting the server leads into a TargetInvocationException, you'll need to add a url to your urlacl settings by executing the following command (on Windows :)) in an elevated command line: netsh http add urlacl url=http://+:9090/ user=your_user_name

Supported platforms

  • Any modern web browser (Chrome, Firefox, Edge, Safari) by simply hosting it
  • Mobile platforms (iOS, Android, Windows) by packaging the app using Cordova
  • Desktop platforms (Windows, Mac OS X, Linux) by packaging the app using NW.js

Third-Party Libraries

JavaScript, CSS

Native Wrappers

Additional Resources

About

Repository for the talk ""Write once, run anywhere" with nw.js & Cordova: for real!" from Christian Weyer and Manuel Rauber at Angular Connect 2015.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published