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

bluemix-generator

v0.4.1

Published

Generate backend templates for Bluemix

Downloads

16

Readme

Bluemix Generator

Generate backend templates for Bluemix

npm version dependencies

Table of Contents

CLI

$ npm install -g bluemix-generator
$ bluegen

Demo

Summary

The Bluemix Generator, or bluegen, is a cross-platform tool developed by the CORD team to quickly generate complex backends for samples and templates using IBM Bluemix. The tool provisions requested services, populates them with user-defined data, scaffolds template code, and sets up a new project for fast and easy deployment to Bluemix.

In addition, bluegen supports event-based custom service handlers that let a developer specifically tailor his or her template with dynamically-generated files, messages, and actions for a user.

Note: This package is not intended for production environments

Specifications

For bluegen to work, the template repository must be in the following format:

data/
template/
generator.js (optional)
generator.json

The data/ directory is required as bluegen copies the contents of this folder into your newly generated project for redeployment. The template/ directory holds the files you want to scaffold, and the generator.json defines the runtime and services of your application.

For your generator.json to be valid, it requires the following fields:

app.name
app.description

runtime.name
runtime.description

For each service to be valid, it requires the following fields:

service.name
service.deployname
service.description
service.type

Note: Currently the only built-in service handlers are for Cloudant NoSQL DB and Object Storage

Custom Service Handlers

Custom service handlers are also optionally supported, so you can specify actions to be taken after a specific service is provisioned by adding a generator.js.

There are currently four events that are triggered:

  1. validation: The validation event is triggered immediately when the application is started. It can be used to verify the user's environment.

  2. preferences: The preferences event is triggered after a user goes through the interactive prompt. It contains data like the organization, space, and application name.

  3. service: The service event is triggered immediately after each service specified in the configuration file is provisioned. It contains the service credentials that Bluemix returns for that particular service.

  4. complete: The complete event triggers after the template is set up and services provisioned. Here we can specify instructions for how the user should run the new project.

Examples

The examples/ directory in this repository links to the current backends that are using the Bluemix Generator.

Redeploying data

Simply run the command bluegen inside your project directory to redeploy data to Cloudant NoSQL DB and Object Storage.

Contributing

We welcome those who wish to contribute. Please see the contributing guidlines.

License

This package contains sample code provided in source code form. The samples are licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 and may also view the license in the license file within this package.