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

推荐订阅源

Y
Y Combinator Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
WordPress大学
WordPress大学
T
Threatpost
K
Kaspersky official blog
Cisco Talos Blog
Cisco Talos Blog
博客园 - 三生石上(FineUI控件)
Vercel News
Vercel News
T
Tenable Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 热门话题
Scott Helme
Scott Helme
云风的 BLOG
云风的 BLOG
博客园 - Franky
Webroot Blog
Webroot Blog
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
F
Fortinet All Blogs
PCI Perspectives
PCI Perspectives
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
月光博客
月光博客
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Help Net Security
Help Net Security
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
O
OpenAI News
Martin Fowler
Martin Fowler
W
WeLiveSecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
Project Zero
Project Zero
V
Vulnerabilities – Threatpost
L
LangChain Blog
P
Privacy & Cybersecurity Law Blog
S
Security Affairs
P
Privacy International News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
MyScale Blog
MyScale Blog
NISL@THU
NISL@THU
T
Troy Hunt's Blog
C
Cisco Blogs
IT之家
IT之家

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

目前不支持,后续加入