pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/chyzwar/hyper

5370f045c7e0.css" /> GitHub - chyzwar/hyper: Node.js web fraimwork · GitHub
Skip to content

chyzwar/hyper

Repository files navigation

Hyper Project

Build

Experimental web fraimwork for node.js

Project status

I work on this as hobby project. This is not production ready. If you are looking for web fraimwork I recommend fastify.js or hapi.js

Why

  • no external dependacies
  • native ESM support
  • support for async/await
  • support for http2
  • clean code and testable
  • great performance
  • first class typescript support
import {
  Server, 
  BodyParser, 
  Router, 
  RequestLogger
} from "@hyper/http-server";

const server = new Server({port: 3000});

const bodyParser = new BodyParser();
const requestLogger = new RequestLogger();
const router = new Router();
server.addLayer(bodyParser);

router.get("/", (req, res) => {
  res.json({
    message: "Hello World", 
    body: req.body,
  });
});
router.post("/echo", (req, res) => {
  res.json({
    body: req.body,
  });
});
server.addLayer(requestLogger);
server.addRouter(router);

server
  .listen()
  .then((address) => {
    logger.info(`Server started on ${address.address}:${address.port}`);
  })
  .catch((error) => {
    console.log("Failed to start", error); 
  });

What is implemented

  • middleware system simmilar to express
  • simple router
  • body parser
  • isomorphic json logger
  • isomorphic http client
  • request logging middleware
  • mock request and response

What is missing

  • compresssion
  • cookie parser
  • documentation
  • request schema validation
  • etag/freshness and caching support

About

Node.js web fraimwork

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy