0.0.43 • Published 4 years ago

@emvicify/cli v0.0.43

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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*
```bash
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*
```bash
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); });

0.0.43

4 years ago

0.0.41

5 years ago

0.0.42

5 years ago

0.0.40

5 years ago

0.0.39

5 years ago

0.0.38

5 years ago

0.0.37

5 years ago

0.0.36

5 years ago

0.0.34

5 years ago

0.0.35

5 years ago

0.0.33

5 years ago

0.0.32

5 years ago

0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

6 years ago

0.0.28

6 years ago

0.0.27

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.13

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago