Git Product home page Git Product logo

barehttp's People

Contributors

dependabot[bot] avatar kgrover-swe avatar sckv avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

barehttp's Issues

Add more integration tests

Problem

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.

Routes usage report

Routes usage report for the hits, median time is pretty format, in file or console.

Also retrieved by an endpoint.

Make a sound return from route handlers

Problem

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.

Solution

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)

Expand README

Provide a good repository landing page, with basic examples and features.
Explain the exposed API and WebServer options.

Cookies parsing / encoding

Problem

No efficient cookies parsing or encoding strategy.

Solution

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.

Streamed body cacher / receiver

Problem

Right now body received is a Buffer stream for post/put/patch calls.

Solution

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)

Add CORS middleware integration

Enable users to consume the Webserver from the frontend with CORS options if those are required.

Should be passed through the service constructor.

Add WebSocket built-in support

Add an exposure and control for a WebSocket implementation.

Expose a handy way to attach listeners, middlewares, and handlers for the WebSocket stream

Headers cache handling

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.

Need logo

Need to think about something with the name and the flow. Probably rethink the name of the project or combine it.

Broken sound return with undefined or null body

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)

Add `semantic-release` as releaser for automatic publishing

Problem

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.

Solution

Investigate action for semantic-release, set up environment and npm access

Request execution cancellation

Problem

No way to cancel a request in a premature state without bubbling up an error to errorHandler function.

Solution

Using context, implement a direct method to abort an incoming request, in the future this will help for 504 and 503 notification codes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.