New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

echart

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

echart

mock service

latest
npmnpm
Version
0.1.3
Version published
Weekly downloads
702
-13.76%
Maintainers
1
Weekly downloads
 
Created
Source

#moc

前端构造数据服务

安装

npm i moc --save

# global install

sudo npm i moc -g

import moc from 'moc'

const config = {
    mockRoot: __dirname, // 默认项目跟目录
    port: 3000, // 启动端口
    tasks: { // 任务处理函数
        modifyTask (ctx, next) {
            return {
                data: 0,
                message: 'success'
            }
        },
        webTask (ctx, next) {
            let {level, method} = ctx.params
            return `./web/${level}/${method}`
        }
    },
    mapping: { // 请求任务映射关系
        modifyTask: ['**/modify', '**/update'],
        webTask: [
            'web/user/:level/:method'
        ]
    }
}

mock.start(config)

Keywords

mock

FAQs

Package last updated on 22 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts