Skip to content

Mozilla extension to switch hosts keeping parameters

Notifications You must be signed in to change notification settings

lluis/switch_env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

switch_env

Replaces host in current URL keeping path and parameters.

Useful for changing environments during development.

screenshot

Configuration

switch_env configuration is a json Array:

[
  {
    'development': 'http://localhost:3000',
    'staging': 'https://staging.myapp.com',
    'production': 'https://production.myapp.com'
  }
]

Each Hash in the Array is a group of environments (i.e. an application).

The key of each entry is the name and the value is the URL.

You can add multiple applications to the Array:

[
  {
    'development': 'http://localhost:3000',
    'staging': 'https://staging.myapp1.com',
    'production': 'https://production.myapp1.com'
  },
  {
    'development': 'http://localhost:3001',
    'staging': 'https://staging.myapp2.com',
    'production': 'https://production.myapp2.com'
  }
]

And multiple URLs in environments:

[
  {
    'development': 'http://localhost:3000',
    'staging': [
      'https://staging.myapp.com',
      'https://stag_alias.myapp.com'
    ],
    'production': [
      'https://production.myapp.com',
      'https://prod_alias.myapp.com'
    ]
  }
]

About

Mozilla extension to switch hosts keeping parameters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published