ottoman-cli

1.0.0-beta.3 • Public • Published

Ottoman CLI

Goals:

  • Provide some useful tools while working with Ottoman.
  • Speed up the Ottoman setup process.
  • Help to keep database sync easily in Development and Production environments.
  • Automate Ottoman's process.

Install

npm install -g ottoman-cli

Usage:

ottoman-cli generate

Commands:

  • generate
  • migrate

Generate command

Ottoman CLI generate command will create an Ottoman app for you in no time, just follow the available steps in the wizard. Happy Coding!

Migrate command

ottoman-cli migrate

Ottoman CLI migrate command will sync your database with the information took from your models. Scopes, Collections and Indexes will be created automatically after run the migrate command.

Constraints:

  1. You should build your app before run the migrate command
npm run build
ottoman-cli migrate
  1. env variables should point to the built code

Correct

OTTOMAN_CLI_MODEL_PATTERN="dist/**/*.model.js"

Incorrect

OTTOMAN_CLI_MODEL_PATTERN="src/**/*.model.ts"
  1. OTTOMAN_CLI_ENTRY="dist/config/ottoman.js" entry point file should export an ottoman instance
import { Ottoman } from "ottoman";

const ottoman = new Ottoman(...);

export { ottoman };

Readme

Keywords

none

Package Sidebar

Install

npm i ottoman-cli

Weekly Downloads

4

Version

1.0.0-beta.3

License

MIT

Unpacked Size

61.9 kB

Total Files

117

Last publish

Collaborators

  • ejscribner_cb