sckv / barehttp Goto Github PK
View Code? Open in Web Editor NEWMinimalistic, lightweight, and fast cloud-oriented Node.js webserver to perform as Microservice or BFF proxy.
License: MIT License
Minimalistic, lightweight, and fast cloud-oriented Node.js webserver to perform as Microservice or BFF proxy.
License: MIT License
Right now body received is a Buffer stream for post/put/patch
calls.
Study the implications and the correlation between request headers and body contains.
Implement correct headers deserialization strategy following mainly the request headers. Need to have a fallback if the request headers were not correct or some general basic case (for example json)
Need to think about something with the name and the flow
. Probably rethink the name of the project or combine it.
Study a code generation and application for type responses for the routes, if those are applicable to a JSON response.
How we can code generate on server start time.
Benchmark the server start delay and performance gains.
Measure memory impact
https://github.com/fastify/fast-json-stringify
https://github.com/dsherret/ts-morph
https://github.com/lukeautry/tsoa
TypeScript native API
There are not enough integration tests for all the possible cases. Take the time and implement all the designed paths of the accesses and data types.
Add an exposure and control for a WebSocket implementation.
Expose a handy way to attach listeners, middlewares, and handlers for the WebSocket stream
Right now route handlers are providing the FlowRequest
context that exposes a huge API. Handler successful execution and data sending is pending send/json/stream
exposed API.
Make handler agnostic to send/json/stream
exposed API, deduce the return type out of the handler, resolve it correctly and send it by the server with the necessary headers (basic, for json or stream multipart)
Enable users to consume the Webserver from the frontend with CORS options if those are required.
Should be passed through the service constructor.
No efficient cookies parsing or encoding strategy.
Explore available packages or write a personal solution for the encoding/decoding as already injected middleware and enable/disable it with server option.
Expose a clear api from FlowRequest
to encode/read cookies.
Calculate correct headers when sending chunked responses
No execution context out of callback stack.
Implement general storage for async contextual information with https://nodejs.org/api/async_hooks.html.
Each request should have a memory-leak-free, isolated and efficient context storage globally accessible.
There is no automatic publishing process, set up an action that will automatically release a package to npm upon merging from master to a release branch.
Investigate action for semantic-release
, set up environment and npm access
While returning an empty response undefined | null
from a handler, there's an error while trying to access to the constructor type of the response.
TypeError: Cannot read property 'constructor' of undefined
at BareServer.soundRouteReturn (/Users/k/personal/gql-runtime-gateway/packages/broker/node_modules/barehttp/lib/server.js:192:26)
at /Users/k/personal/gql-runtime-gateway/packages/broker/node_modules/barehttp/lib/server.js:177:44
at processTicksAndRejections (internal/process/task_queues.js:95:5)
Define a simple API to handle each request cache strategy, type all the possibilities and combinations to have as hints for the using developer.
Study if it's good to set on handler definition, usage level, or design a decorator that will define the properties in a handy way.
Provide a good repository landing page, with basic examples and features.
Explain the exposed API and WebServer
options.
Routes usage report for the hits, median time is pretty format, in file or console.
Also retrieved by an endpoint.
No way to cancel a request in a premature state without bubbling up an error to errorHandler
function.
Using context, implement a direct method to abort an incoming request, in the future this will help for 504 and 503 notification codes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.