惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
L
LangChain Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
月光博客
月光博客
F
Full Disclosure
G
Google Developers Blog
MongoDB | Blog
MongoDB | Blog
T
Tailwind CSS Blog
F
Fortinet All Blogs
A
About on SuperTechFans
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Recorded Future
Recorded Future
Y
Y Combinator Blog
博客园 - 聂微东
爱范儿
爱范儿
D
DataBreaches.Net
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
The Hacker News
The Hacker News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
SecWiki News
SecWiki News
Webroot Blog
Webroot Blog
Engineering at Meta
Engineering at Meta
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
O
OpenAI News
Google DeepMind News
Google DeepMind News
Security Archives - TechRepublic
Security Archives - TechRepublic
W
WeLiveSecurity
Hacker News: Ask HN
Hacker News: Ask HN
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Troy Hunt's Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
V
Vulnerabilities – Threatpost
N
News and Events Feed by Topic

Fgaoxing

MiniGFM:3KB的轻量Markdown渲染库 Go反射:性能瓶颈与零拷贝优化 至全体朋友 Goh:一款Go语言的预编译快速模板引擎。(Benchmark排名第一) 【预告】关于函数传参时栈的变化 【谈谈当下】青少年口中的垃圾话语 【LSP】微型滚动动画库 推一下 Vercel 加速节点 网站优化小窍门 【显微镜下的世界】0x1 【Hexo】优化教程 【CDNN】CDNN再添一员 懒加载的妙用:缓存篇 【FastJump.js】简单的快速跳转技术 BiliBili崩了 【New Bing】New Bing免代理申请和使用 Python实现文件查重 放开想,越离谱越好 2022 夏季应用推荐
simplest-server
Fgaoxing · 2023-01-10 · via Fgaoxing

¶前情

给各位道个歉,好久没更新了

给大家带来一个好东西

众所周知,我会node.js

但是把,我一开始就选择了http库(就是原生库)

所以用express就会不太顺手

但是原生的http又没啥东西,就很难受几乎什么都要自己写,包括cookie的操作

所以我就基于原生的http包写了一个框架,使用路由的方式,可以使用无服务器函数

GitHubsimplest-server
NPMsimplest-server
LGPLLicense

¶有关包的一些东西

目前由JS编写使用CJS引入,后续可能会迁移到Ts

这个NPM包目前是测试版,但基础功能已经OK了

你可以这样引入

1
const ss = require('simplest-server');

目前包含如下函数

1
2
3
4
5
6
const ss = require('simplest-server');
ss.http # http服务
ss.maps # 本地文件映射
ss.map # 本地文件映射
ss.ejs # 集成的EJS
ss.err # 返回报错页面

更多文档看Simplest Server 文档(大概率没写完,所以只能等)

¶关于https

目前不支持,后续加入