# smp-http

> 跟node中的http模块调用方法一样

Latest version **1.0.0** (published 2020-10-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install smp-http
pnpm add smp-http
yarn add smp-http
bun add smp-http
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-10-16 |
| First published | 2020-10-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | gaowb |

## Links

- npm: https://www.npmjs.com/package/smp-http
- npm.io page: https://npm.io/package/smp-http

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^7.3.1
- [express](https://npm.io/package/express.md) ^4.17.1

## Recent versions

- 1.0.0 (latest) — 2020-10-16

## README

### 示例
跟node中的http模块调用方法一样

```
const http = require("./src/http.js")

const server = http.createServer((req, res) => {
    res.setHeader('Content-Type', 'application/json')
    res.end(200, JSON.stringify(req.httpMessage));
});

server.listen(8888, () => {
    console.log("server start at localhost:8888");
});
```

---
_Source: https://npm.io/package/smp-http · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
