项目作者: crapthings

项目描述 :
switch between meteor apps on cordova
高级语言: JavaScript
项目地址: git://github.com/crapthings/meteor-switch-root-url.git
创建时间: 2017-12-20T05:44:43Z
项目社区:https://github.com/crapthings/meteor-switch-root-url

开源协议:

下载


WHY

when you want to switch between multiple meteor app on cordova and keep last root url while reopen your app, this is the answer

its okay to redirect to another domain by using window.location.href or replace on desktop browser, but when work with cordova, u should replace all DDP connection and window.location.reload()

INSTALL

add package then edit .meteor/packages, move crapthings:switch-root-url to on top of any other packages like below

  1. meteor add crapthings:switch-root-url
  1. # Meteor packages used by this project, one per line.
  2. # Check this file (and the other files in this directory) into your repository.
  3. #
  4. # 'meteor add' and 'meteor remove' will edit this file for you,
  5. # but you can also edit it by hand.
  6. crapthings:switch-root-url
  7. meteor-base@1.2.0 # Packages every Meteor app needs to have
  8. mobile-experience@1.0.5 # Packages for a great mobile UX
  9. mongo@1.3.1 # The database Meteor supports right now
  10. blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
  11. reactive-var@1.0.11 # Reactive variable for tracker
  12. tracker@1.1.3 # Meteor's client-side reactive programming library
  13. standard-minifier-css@1.3.5 # CSS minifier run for production mode
  14. standard-minifier-js@2.2.0 # JS minifier run for production mode
  15. es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers
  16. ecmascript@0.9.0 # Enable ECMAScript2015+ syntax in app code
  17. shell-server@0.3.0 # Server-side component of the `meteor shell` command
  18. autopublish@1.0.7 # Publish all data to the clients (for prototyping)
  19. insecure@1.0.7 # Allow all DB writes from clients (for prototyping)

API

examples

  1. Meteor.switchRootUrl('https://another.meteorapp.com')
  1. Meteor.switchRootUrl('http://localhost:4000')

INSPIRATION