Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

ggondim/whatwg-http-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caution

This project has been archived due to newer initiatives like WinterTC.


WHATWG HTTP Server

An universal way to implement HTTP server listeners, using WHATWG-similar standards. Translates your endpoint to many HTTP server implementations, like Node.js, Express.js, Azure Functions and more.

Problem

WHATWG Fetch API standardized the way we treat HTTP Request and Response objects in browser, but JavaScript HTTP servers don't follow any standard.

This makes your API bounded to a specific framework and harder to change it to another application environment because the vendor lock-in.

Some comparative examples of different HTTP server implementations in JavaScript:

Node.js native HTTP Express.js Azure Functions

This way your endpoint logic is bounded to specific request/response types, each one with different properties, methods and HTTP response approachs, without any convention.

Solution

  1. Define your API using WHATWG-similar types
  2. Export it like anything your server needs

chrome-capture

This way you can easily change from and to any framework or application environment, without changing your main code logic.

Usage

Installing

Defining the endpoint logic

Differences from WHATWG Fetch API types

HTTP server implementations

Conttributing

License

About

An universal way to implement HTTP server listeners, using WHATWG-similar standards. Translates your endpoint to many HTTP server implementations, like Node.js, Express.js, Azure Functions and more.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors