New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

easy-rest

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

easy-rest

Lightweight RESTful Server

npmnpm
Version
0.3.5
Version published
Maintainers
1
Created
Source

EasyREST.js

轻量级 JavaScript RESTful 服务端框架,NPM 包名 easy-rest

【主要模块】

HTTP 服务器

URL 路由规则

  • 优先查找 ./public/ 下的同路径文件,并默认以其格式对应的 MIME-Type 响应
  • Accept 请求头为 application/octet-stream,文件响应则为下载
  • 若无可用文件,再尝试运行 ./HTTP/ 下路径首级同名模块

文件上传模块

  • 文件存在以其 MINE-Type 主类型为名的 ./public/ 子目录中
  • 支持 SHA-1 校验算法,方便排除重复文件

【典型案例】

xMemory 家用云服务器

Keywords

RESTful

FAQs

Package last updated on 14 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