1.0.0-alpha2 • Published 7 years ago

mastery v1.0.0-alpha2

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

MasteryJS Command Line Utility

Command line utility to get started easily on MasteryJS, a scalable REST API framework build on top of Hapi and Sequelize.

npm version Dependency Status devDependency Status

API Documentation

Table of Contents

  1. Main Features
  2. Getting Started
    1. Prerequisites
    2. Installation
  3. Commands
    1. Server Management
    2. CLI Configuration

Main Features

  • Build system for MasteryJS
  • PM2 configuration using mastery.run.json file, see PM2 Process File
  • Server management including start, stop, and reloading MasteryJS production ready package
  • Monitor MasteryJS processes using PM2 Monitoring
  • Ability to speak many languages

Getting Started

Prerequisites

  1. Git
  2. NodeJS version 6 or greater

Installation

Windows

Open Command Prompt that you will probably need to run as Administrator. And then, type

npm install -g mastery

MacOS/Linux

sudo npm install -g mastery

Commands

Server Management

New

Create a new MasteryJS project, cloning/download the latest source from MasteryJS repo.

This command can be executed anywhere.

Usage:

mastery new [destination]

After that, a wizard will showing and there are some questions to follow.

Serve

Turn on MasteryJS directly from the source using babel-node.

This command must be executed inside the root of MasteryJS project.

Usage:

mastery serve -i|--inspect -p|--port <n>
  • -i, --inspect enable Chrome Developer Tools Inspector. This argument is optional.

  • -p, --port \ enable --debug-brk feature, to debug using any supported IDE. Fill \ with a port number.

Build

Build a MasteryJS project, this will transform MasteryJS source codes into ES2015 minified codes using babel + uglify. Also, a mastery.run.json file will be created for the PM2 needs. After that, a 'build' directory will exist. You can then deploy this directory.

This command must be executed inside the root of MasteryJS project.

Usage:

mastery build

Start

Start MasteryJS server that has been built before using PM2. By default, the processes spawned are using cluster mode.

This command must be executed inside the build of MasteryJS project.

Usage:

mastery start

Stop

Stop MasteryJS server.

This command must be executed inside the build of MasteryJS project.

Usage:

mastery stop

Restart

Restart MasteryJS server. This will execute the stop and start commands.

This command must be executed inside the build of MasteryJS project.

Usage:

mastery restart

Status

Launch PM2 Process Monitoring.

This command can be executed anywhere.

Usage:

mastery status

Scale

Scale MasteryJS cluster processes length that currently running.

This command must be executed inside the build of MasteryJS project.

Usage:

mastery scale [length]
  • length is optional. If length is not provided, a question will be prompted to define the length.

CLI Management

Conf

Change CLI configuration config.json value and change CLI language as well.

This command can be executed anywhere.

Usage:

mastery conf [key] [value]
  • key Configuration key to change its value.
  • value The new configuration value.

Example for changing the CLI language to Indonesian:

mastery conf lang id
1.0.0-alpha2

7 years ago

1.0.0-alpha1

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.1.19

7 years ago

0.1.18

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago

1.0.0

7 years ago