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

cocoa

v4.0.1

Published

Password generator microservice

Downloads

85

Readme

cocoa

Join the chat at https://gitter.im/avoidwork/cocoa Password generator service

demo graphic

build status

What can cocoa do for me?

cocoa is a service which can generate 1 or many passwords using a mnemonic word list, and email you the result(s). The password(s) is not logged, or saved anywhere.

How do I run cocoa?

cocoa can be up and running in 3 steps! When run in a production environment, it's recommended that you use NGINX to terminate SSL, and reverse proxy to cocoa. Using a daemon like upstart (on Linux) to run cocoa is ideal.

  1. Clone this repository, or install from npm:
    1. $ npm install cocoa
    2. $ ln -s node_modules/cocoa/config.json config.json
    3. $ ln -s node_modules/cocoa/index.js index.js
  2. (Optional) Edit config.json to configure your email server, etc.
  3. Run via node index.js.

Upstart

Use the provided upstart recipe: sudo sh -c 'cp node_modules/cocoa/cocoa.conf /etc/init; service cocoa start;'

Systemd

Use the provided systemd service: sudo sh -c 'cp node_modules/cocoa/cocoa.service /etc/systemd/system; systemctl enable cocoa; systemctl start cocoa;'

What about Windows?

It runs great on Windows, but you're on your own to daemonize it!

Request parameters

words

Integer (3) The amount of words to use

min

Integer (0) Minimum length of the password

max

Integer (0) Maximum length of the password

passwords

Integer (1) The amount of passwords to generate

special

Boolean (false) Randomly adds common "special" characters to a password, including capitalization

Configuration

{
    "auth": /* Optional, see tenso authentication section */
    "compress": false, /* Optional, enabled by default, disabled with SSL */
    "email": { /* Optional, disabled by default */
        "enabled": true,
        "host": "smtp.host",
        "port": 465,
        "secure": true,
        "from": "You <you@yourdomain>",
        "user": "you@yourdomain",
        "pass": "password"
    },
    "headers": { ... }, /* Optional, custom headers */
    "hostname": "localhost", /* Optional, default is 'localhost' */
    "json": 2, /* Optional, default indent for 'pretty' JSON */
    "logging": { /* Optional */
        "level": "info",
        "enabled": true
    },
    "port": 9090, /* Optional, default is 9090 */
    "rate": {
        "enabled": true,
        "limit": 450, /* Maximum requests allowed before `reset` */
        "reset": 900, /* TTL in seconds */
        "status": 429, /* Optional HTTP status */
        "message": "Too many requests",  /* Optional error message */
        "override": function ( req, rate ) { ... } /* Override the default rate limiting */
    },
    "session": { /* Optional */
        "secret": null,
        "store": "memory", /* "memory" or "redis" */
        "redis": /* See connect-redis for options */
    },
    "ssl": { /* Optional */
        "cert": null,
        "key": null
    },
    "title": "My API", /* Page title for browsable API */
    "uid": N /* Optional, system account uid to drop to after starting with elevated privileges to run on a low port */
}

License

Copyright (c) 2017 Jason Mulligan Licensed under the BSD-3 license.