npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

developer-environment

v1.0.1

Published

Easy setup of developer environment

Downloads

2

Readme

Developer environment

Easy installation of developer environment.

Description

  1. Specify which binaries you require
  2. Add configuration regarding those binaries
  3. Call install()
  4. Wait a few min
  5. Developer environment with application server, identity provider, database and more is now installed and configured.

Installation

npm install developer-environment --save

Usage

const devEnv = require("developer-environment");

const conf = {
    cwd: "envDir",                          //Optional | Default value => process.cwd()
    binaries: {
        wildfly: {
            version: "20.0.1.Final",        //Required
            debugPort: 8787,                //Optional | <= Default value
            portOffset: 0,                  //Optional | <= Default value
            username: "admin",              //Optional | <= Default value
            password: "password",           //Optional | <= Default value
            datasource: "MyDS",             //Optional | Default value => null
            memory: {
                Xms: "64m",                 //Optional | <= Default value
                Xmx: "2048m",               //Optional | <= Default value
                MetaspaceSize: "96M",       //Optional | <= Default value
                MaxMetaspaceSize: "1024m"   //Optional | <= Default value
            },            
            systemProperties: {             //Optional | Default value => { }
                "keycloak.url": "http://localhost:8081/auth" 
            },
            secureDeployments: {
                names: [ "my-app.war" ],    //Optional | Default value => [ ]
                properties: {               //Optional | Default value => { }
                    "auth-server-url": `http://localhost:8081/auth`
                }
            }
        },
        keycloak: {
            version: "11.0.0",              //Required
            portOffset: 1,                  //Optional | <= Default value
            username: "admin",              //Optional | <= Default value
            password: "password",           //Optional | <= Default value
            jsonFile: "realm.json"          //Optional | Default value => null
        },
        keycloakWildflyAdapter: {
            version: "11.0.0"               //Required
        },   
        mongodb: {
            version: "4.4.0",               //Required
            port: 27017,                    //Optional | <= Default value
            linuxDist: "ubuntu1804"         //Optional | <= Default value
        },
        mongodbDbTools: {
            version: "100.1.1",             //Required
            linuxDist: "ubuntu1804"         //Optional | <= Default value
        },
        postgresql: {
            version: "10.5-1",              //Required
            install: true,                  //Optional | <= Default value
            port: 5432,                     //Optional | <= Default value
            username: "admin",              //Optional | <= Default value
            password: "password",           //Optional | <= Default value
            db: "myDB"                      //Optional | <= Default value
        },
        jdbcPostgresql: {
            version: "42.2.5"               //Required
        }
    },
    repositories: [                         //Optional | Default value => [ ]
        {
            url: "[email protected]:AndreasArvidsson/developer-environment.git",
            cwd: __dirname
        }
    ]
};

devEnv.install(conf)
    .then(options => {
        console.log("DONE");
        //options is the config for each binary with default values added.
        console.log("Options", options);
    });

Version only

If no other properties then the version is required the entire config object can be replace by the version string.
The following two configs are equivalent.

{
    wildfly: "20.0.1.Final"
}
{
    wildfly: {
        version: "20.0.1.Final"
    }
}

Keycloak realm export

Export current keycloak realm settings as json file.

devEnv.keycloakExport({
    version: "11.0.0",                  //Required
    realm: "MyRealm",                   //Required
    cwd: "envDir",                      //Optional | Default value => process.cwd()
    portOffset: 1,                      //Optional | <= Default value
    jsonFile: "realm.json"              //Optional | <= Default value
});

Deploy to wildfly

Deploy all war files in specified dir to Wildfly.

devEnv.deploy({
    version: "11.0.0",                  //Required
    dir: "my-app",                      //Required
    cwd: "envDir",                      //Optional | Default value => process.cwd()
    host: "localhost",                  //Optional | <= Default value
    port: 9990,                         //Optional | <= Default value
    username: "user",                   //Optional | Default value => null
    password: "password"                //Optional | Default value => null
});

Un-deploy disabled

Un-deploy all disabled Wildfly deployments.

devEnv.deploy({
    version: "11.0.0",                  //Required
    cwd: "envDir",                      //Optional | Default value => process.cwd()
    host: "localhost",                  //Optional | <= Default value
    port: 9990,                         //Optional | <= Default value
    username: "user",                   //Optional | Default value => null
    password: "password"                //Optional | Default value => null
});