@emvicify/cli
CLI for Emvicify Framework
Last updated 2 months ago by lcnvdl .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @emvicify/cli -g
SYNC missed versions from official npm registry.

Emvicify CLI

Scaffolding tool for Emvicify

NPM Version Build Status

Wiki

Installation

You can install the package from npm.

npm i -g @emvicify/cli

Usage

For the complete command list, please go to the Wiki - CLI Command List page

mfy --help
emvicify --help

Getting started

  1. Run the command in your NPM Project folder
mfy here
  1. Follow the wizard
  2. (Optional) Power emvicify with its plugins

Happy coding ;)

CLI Commands Examples

For the complete command list, please go to the Wiki - CLI Command List page

Add a new controller - it'll create an UsersController class

mfy add:controller Users

or

mfy ac Users

Add a new router - it'll create an AuthRouter class

mfy add:router Auth

or

mfy ar Auth

Add a new service - it'll create an UsersManagementService class

mfy add:service UsersManagement

or

mfy as UsersManagement

Add a new empty middleware - it'll create an AuthMiddleware class

mfy add:middleware Auth

or

mfy am Auth

Add a new Basic Authentication middleware (overriding all virtual methods for you to use it)

mfy am --authentication basic --with-overrides Auth

FAQ

How can I add an express plugin?

You can add a function called "configureAppBeforeServe" with your custom implementation.

Complete example

const { start } = require("emvicify");
const settingsFile = require("./settings.json");
const expressSettings = {
    bodyParserJson: true,
    bodyParserUrlencoded: true,
    bodyParserRaw: false
};

function configureAppBeforeServe(app, http) {
    //  Extra express plugin
    const cors = require("cors");
    app.use(cors());
}

start(process.cwd(), settingsFile.port, { settingsFile, expressSettings, configureAppBeforeServe }).then(() => {
    console.log(`Listening on port ${settingsFile.port}`);
}, err => {
    console.error("Application failed", err);
});

Current Tags

  • 0.0.31                                ...           latest (2 months ago)

29 Versions

  • 0.0.31                                ...           2 months ago
  • 0.0.30                                ...           2 months ago
  • 0.0.29                                ...           7 months ago
  • 0.0.28                                ...           7 months ago
  • 0.0.27                                ...           7 months ago
  • 0.0.26                                ...           7 months ago
  • 0.0.25                                ...           9 months ago
  • 0.0.24                                ...           9 months ago
  • 0.0.23                                ...           9 months ago
  • 0.0.22                                ...           9 months ago
  • 0.0.21                                ...           9 months ago
  • 0.0.20                                ...           9 months ago
  • 0.0.19                                ...           9 months ago
  • 0.0.18                                ...           9 months ago
  • 0.0.17                                ...           9 months ago
  • 0.0.16                                ...           9 months ago
  • 0.0.15                                ...           9 months ago
  • 0.0.13                                ...           9 months ago
  • 0.0.11                                ...           9 months ago
  • 0.0.10                                ...           9 months ago
  • 0.0.9                                ...           10 months ago
  • 0.0.8                                ...           10 months ago
  • 0.0.7                                ...           10 months ago
  • 0.0.6                                ...           10 months ago
  • 0.0.5                                ...           10 months ago
  • 0.0.4                                ...           10 months ago
  • 0.0.3                                ...           10 months ago
  • 0.0.2                                ...           10 months ago
  • 0.0.1                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 30
Last Day 0
Last Week 29
Last Month 23
Dependencies (6)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |