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

api-proxy-samicelus

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api-proxy-samicelus

`npm i api-proxy-samicelus`

latest
npmnpm
Version
1.0.3
Version published
Weekly downloads
6
500%
Maintainers
1
Weekly downloads
 
Created
Source

适用于模块化API网关的node.js sdk, 需配合consultModulation图形化web端使用

安装

npm i api-proxy-samicelus

需求

  • mongodb数据库
  • redis
  • 在consultModulation图形化web端定制你的api

使用

//引入包,配置数据库和缓存连接
const api = require('api-proxy-samicelus')(
    {
        mongoConfig:{
            host:'127.0.0.1',
            port: 27017,
            db: 'test'
        },
        redisConfig:{
            host: '127.0.0.1',
            port: 6379
        }
    }
)

async function callAPI(options){
    let result = await api.callConfigedApi({
        app_id: options.app_id,
        apiName: options.apiName,
        params: options.params
    console.log(result);
}
//将在控制台输出对应api配置输出

callAPI({
    app_id: "5ebcfb26b5ffe13eac302917" // 在web端预配置的应用id
    apiName: "同步药品目录" // 在web端预配置的api名称
    params: {} // 调用时的入参键值对 JSON格式
})

FAQs

Package last updated on 08 Jul 2020

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