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

db-console

v1.0.1

Published

The database REPL console for modern node.js app.

Downloads

259

Readme

DB Console

NPM version Build Status Test Coverage Dependency Status DevDependency Status License PR Welcome

The database REPL console for modern node.js app.

Design Philosophy

There isn't a tool in javaScript world which behaves similar to Ruby on Rails' rails console. This is really a handy feature: opening up an REPL console and executing some model commands. However, javaScript is more like a split world. I want to make a generic console tool to hook into different ORM environments.

Install

It's recommended to install this locally to your package.

npm install --save-dev db-console

And add the following to your scripts field in package.json.

"console": "db-console"

Configuration

DB Console read configurations from several places.

  1. dbConsole field in package.json
  2. configuration file which default name is .dbconsolerc
  3. command line arguments

Precedence

Configuration file take precedence over dbConsole field. And command line arguments have the highest precedence. You can overwrite any configuration with command line arguments.

Free Format

You can write configuration file in any format you want. If the file doesn't have extension, DB Console tries to treat it as json, cson or yaml and load. If the file has extension, supported types include js, json, ts, coffee, cson and yaml.

Customizable

You can use --config-file to make DB Console load the configuration file you want. In this case, the default configuration file is ignored.

Options

  • -h, --help view db-console's help

  • -v, --version view db-console's version

  • -c, --config-file string the config file to load

  • -H, --history-file string the history file to use

  • -o, --orm string the orm library of the models

  • -d, --db string the database connection url

  • -m, --models string, regexp, [string], [regexp] model files matcher

  • -b, --model-base-directory string executing model files matcher in this directory

  • -p, --prompt string the shape of the prompt

Supported ORMs

  • mongoose
  • sequelize
  • sequelize-typescript
  • typegoose
  • typeorm

License

MIT © Zhang Kai Yu