http-responders:零依赖的HTTP响应者

时间:2021-05-02 09:30:39
【文件属性】:
文件名称:http-responders:零依赖的HTTP响应者
文件大小:80KB
文件格式:ZIP
更新时间:2021-05-02 09:30:39
JavaScript http-响应者 零依赖性HTTP响应功能。 支持: json redirect stream file download 例子 const { json , redirect , stream , file , download } = require ( 'http-responders' ) http . createServer ( ( req , res ) => { // Respond with JSON json ( res , { beep : 'boop' } ) // Redirect redirect ( req , res , 'https://example.com/' ) // Respond with a generic stream stream ( res , fs . createReadStream ( 'file
【文件预览】:
http-responders-master
----.prettierignore(11B)
----.gitignore(25B)
----README.md(997B)
----.github()
--------workflows()
----LICENSE(1KB)
----package.json(461B)
----index.js(1KB)
----test.js(4KB)
----package-lock.json(305KB)

网友评论