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

quickly

v0.1.13

Published

Quickly setup dependent services and servers for local development

Downloads

14

Readme

quickly

Quickly setups dependent services and servers for local development

NPM info

Build status dependencies devdependencies

Inspired by Aviator.

Often your application requires other services to run. If you develop locally, starting a particular version of a service locally, or pointing at a remote can be complicated. Quickly solves this. Just write a local quickly.js file in each project that provides local service or needs other local services. Then start all other services needed by entering quickly. If there are multiple configurations, quickly will ask you.

Example

Imagine project A depends on the application B to be running. A could be a server and B could be an API. In the A's root folder create new file quickly.js

module.exports = {
  // this project provides service A
  A: {
    dependencies: {
      path: '../B',
      service: 'API' // which service to load from ../B/quickly.js
    },
    // service A starts 'npm run dev'
    exec: 'npm',
    args: 'run dev'
  }
};

Create another quickly.js file in the project B folder

// project B provides API service
module.exports = {
  API: [{
    exec: 'npm',
    args: 'run watch'
  }]
};

Lifecycle

When starting a project A using quickly command all dependent child processes will be started. When you kill the project A (using Command+C), all child processes will be killed too.

Choices

A quickly.js file can export multiple configurations / services. In this case the system will ask the user which service to ask. For example, if quickly.js has

module.exports = {
  test1: {
    exec: 'echo',
    args: 'running test 1'
  },
  test2: {
    exec: 'echo',
    args: 'running test 2'
  }
};

Then the shell will be

$ quickly 
[email protected] - Quickly setup dependent services and servers for local development
quickly in "/Users/gleb/git/quickly/test/two-choices" undefined
loading /Users/gleb/git/quickly/test/two-choices/quickly.js
...
no dependencies to start
found multiple services "test1", "test2"
? Pick a service to start: (Use arrow keys)
❯ test1 
  test2
# picked second
user chose test2
starting "test2" in "/Users/gleb/git/quickly/test/two-choices" command "echo running test 2"
...
test2: running test 2
service "test2" finished with code 0

Other projects can specify which service to start without prompting the service property

A: {
  dependencies: {
    path: '../two-choices',
    service: 'test2' // do not ask the user, just start test2
  },
  ...
}

For more configuration examples, browser the test folder.

Install

npm install -g quickly

In each project create quickly.js as shown in the example.

Small print

Author: Gleb Bahmutov © 2015 @bahmutov glebbahmutov.com glebbahmutov.com/blog

License: MIT - do anything with the code, but don't blame me if it does not work.

Spread the word: tweet, star on github, etc.

Support: if you find any problems with this module, email / tweet / open issue on Github