JSPM

knex-console

1.1.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q33390F
    • License MIT

    An interactive REPL for Knex

    Package Exports

    • knex-console
    • knex-console/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (knex-console) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    knex-console

    An interactive console for Knex.js.

    Installation


    To install knex-console globally, use the following npm command:

    npm install -g knex-console

    Usage


    To start the interactive console, run:

    knex-console

    Test connection (inside knex-console)

    db.select(1);

    Response

    [ { '?column?': 1 } ]

    Configuration


    To configure knex-console, you need to create a ./knex-console.env file in your home directory. This file should contain your database connection details.

    1. Create .knex-console.env File Inside the home directory, create a .knex-console.env file with the following content:
    DB_CLIENT=pg
    DB_HOST=localhost
    DB_USER=your_username
    DB_PASSWORD=your_password
    DB_NAME=your_database
    DB_PORT=5432

    Replace your_username, your_password, your_database, and adjust the DB_HOST and DB_PORT as needed for your database setup.

    License

    This project is licensed under the MIT License. See the LICENSE file for details.