Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including jitsu-env with all npm packages installed. Try it out:

var jitsuEnv = require("jitsu-env")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

jitsu-env v0.0.3

Prepares package.json for deployment in different Nodejitsu environments (staging, production)

Nodejitsu Environment Manager

Prepares your package.json for deployment in different Nodejitsu applications.

Installation

$ npm install -g jitsu-env

Usage

Create a package.<env>.json file for each environment you'd like to deploy to. e.g. package.staging.json.

Then run

$ jitsu-env staging

to copy properties specified in package.staging.json into package.json. The original package.json is copied to package.base.json.

To reset your package.json to the original values simply call

$ jitsu-env base

Example

package.json

{
    "name": "my-app"
}

package.staging.json

{
    "name": "my-app-staging",
    "subdomain": "staging-myapp",
    "domains": [
        "staging-www.myapp.com",
        "staging-api.myapp.com"
    ],
    "scripts": {
        "predeploy": "gulp build:staging"
    }
}

package.production.json

{
    "name": "my-app",
    "subdomain": "myapp",
    "domains": [
        "www.myapp.com",
        "api.myapp.com"
    ],
    "scripts": {
        "predeploy": "gulp build:production"
    }
}

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free