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

mastery

v1.0.0-alpha2

Published

MasteryJS command line utility

Downloads

10

Readme

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

  • [x] Build system for MasteryJS
  • [x] PM2 configuration using mastery.run.json file, see PM2 Process File
  • [x] Server management including start, stop, and reloading MasteryJS production ready package
  • [x] Monitor MasteryJS processes using PM2 Monitoring
  • [x] 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]
  • [destination] is the path where the new project will be.

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 <n> enable --debug-brk feature, to debug using any supported IDE. Fill <n> 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