{"repo":"htdangkhoa/pure-http","free":true,"listed":false,"github":"https://github.com/htdangkhoa/pure-http","clone":"git clone https://github.com/htdangkhoa/pure-http.git","description":"✨ The simple web framework for Node.js with zero dependencies.","language":"JavaScript","stars":215,"topics":["http","http-server","node","middleware","framework","webserver","expressjs","javascript","router","zero-dependency"],"license":"MIT","category":"networking-infra","readme_excerpt":"pure-http Bring the middleware and router to native http. Installation Usage Basic server: Existing server: Secure server: Application Options: - server : Allows to optionally override the HTTP server instance to be used. Default: undefined . - onError : A handler when an error is thrown (Deprecated: It has been removed from 3.0.0 ). Default: ((error, req, res) = res.send(error)) . - onNotFound : A handler when no route definitions were matched (Deprecated: It has been removed from 3.0.0 ). Default: ((req, res) = res.send(\"Cannot \" + req.method + \" \" + req.url)) . - views : An object to configuration render function. Default: undefined . - dir : A directory for the application's views. - ext : The default engine extension to use when omitted. - engine : Registers the given template engine. - Router Options: - prefix : Allow append the path before each route. Default: undefined . Router API References You can read more at API.md. Benchmarks Please remember that your application code is most likely the slowest part of your application! Switching from Express to pure-http will (likely) not guarantee the same performance gains. - Machine: Ubuntu-s-1vcpu-1gb-sgp1-01, x86-64, Ubuntu 18.04.5 LTS, Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz, 16GB RAM. - Node: v12.18.4 - Run: Tue, 16 Mar 2021 16:09:01 Framework Version Requests/Sec Latency -------------------------- ---------: :----------: ----------: pure-http (with cache) latest \\ 6,349 15.11ms pure-http latest 6,255 15.39ms tinyhttp ","default_branch":null,"files":null,"tree":[],"storefront":"/r/htdangkhoa","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/htdangkhoa/pure-http/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}