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

http-mini

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-mini

a simple static web server base on Express

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

http-mini

基于Express的小型本地服务器,可用于开发阶段开启本地服务器,跑假数据

install

#全局安装
npm install http-mini -g

#切换到根目录文件夹,例如dist,public等打包后的文件夹
cd dist

#http-mini port
http-mini 8083

#http-mini port n/y
http-mini 8088 n  //n表示不自动打开浏览器窗口

#具体使用示例可以见下面

示例目录结构

dist
├── css
│   └── main.css
├── goform
│   └── index.json
├── js
│   ├── lib
|   |   └── a.js
│   ├── controller
│   │   ├── actions
│   │   │   └── b.js
│   │   |── c.js
│   │   └── d.js
│   └── index.js
└── index.html

#所有的数据文件都存储在goform文件夹下的index.json文件中
#对应一个请求`getOnlineUsers`,在json文件中的存在格式如下

{
    "getOnlineUsers":[
        ...
    ]
}

FAQs

Package last updated on 13 Dec 2018

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