Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keroxp/servest
🌾A progressive http server for Deno🌾
https://github.com/keroxp/servest
Last synced: 8 days ago
JSON representation
🌾A progressive http server for Deno🌾
- Host: GitHub
- URL: https://github.com/keroxp/servest
- Owner: keroxp
- License: mit
- Created: 2019-03-09T06:29:18.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2022-10-19T09:29:34.000Z (about 2 years ago)
- Last Synced: 2024-11-12T21:40:08.009Z (30 days ago)
- Language: TypeScript
- Homepage:
- Size: 812 KB
- Stars: 731
- Watchers: 13
- Forks: 38
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-deno - servest - 渐进式HTTP服务器/路由器。 (Uncategorized / Uncategorized)
- awesome-list - servest
- awesome-deno - servest - A progressive HTTP server/router.![GitHub stars](https://img.shields.io/github/stars/keroxp/servest?style=plastic) (Modules / Online Playgrounds)
- awesome-deno-cn - @keroxp/servest
README
# DEPRECADED!
This projected has been deprecated and no longer maintained.
No PR/Issues will be responded.# servest
[![Build Status](https://github.com/keroxp/servest/workflows/CI/badge.svg)](https://github.com/keroxp/servest/actions)
![https://img.shields.io/github/tag/keroxp/servest.svg](https://img.shields.io/github/tag/keroxp/servest.svg)
[![license](https://img.shields.io/github/license/keroxp/servest.svg)](https://github.com/keroxp/servest)🌾A progressive http server for Deno🌾
## Description
`Servest` is a http module suite for Deno. It is composed of three major APIs of
HTTP protocol:- App API: General purpose HTTP routing server.
- Server API: Low-level HTTP API for processing HTTP/1.1 requests.
- Agent API: Low-level API for managing HTTP/1.1 Keep-Alive connection to the
host.In order to experiment and be progressive, we have our own implementation of
HTTP/1.1 server apart from [std/http](https://deno.land/std/http).## Usage
```ts
// @deno-types="https://deno.land/x/servest/types/react/index.d.ts"
import React from "https://dev.jspm.io/react/index.js";
// @deno-types="https://deno.land/x/servest/types/react-dom/server/index.d.ts"
import ReactDOMServer from "https://dev.jspm.io/react-dom/server.js";
import { createApp } from "https://deno.land/x/servest/mod.ts";const app = createApp();
app.handle("/", async (req) => {
await req.respond({
status: 200,
headers: new Headers({
"content-type": "text/html; charset=UTF-8",
}),
body: ReactDOMServer.renderToString(
servest
Hello Servest!
,
),
});
});
app.listen({ port: 8888 });
```## License
MIT