Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/techmely/uwebsocket-use

The composable things you can use direct in your project with uwebsocket
https://github.com/techmely/uwebsocket-use

Last synced: about 1 month ago
JSON representation

The composable things you can use direct in your project with uwebsocket

Awesome Lists containing this project

README

        

# Uwebsocket Use

Here is the todo list I want to compose

## Middleware

Common middleware

- [x] Serve static
- [x] CORS
- [ ] Compress
- [ ] Etag
- [ ] Cache
- [ ] Secure Headers
- [ ] Power By
- [ ] Timing(Latency)
- [ ] Pretty JSON
- [ ] Logger
- [ ] Og Image
- [ ] Feature Flags
- [ ] Cookie

Specific middleware we used

- [ ] Superbase Auth
- [ ] AuthJs
- [ ] Swagger UI
- [ ] Valibot/Zod Validator

## Utility functions

### Request

- [x] assertMethod(req, expected. allowHead?)
- [x] getRequestIp(req)
- [x] getRequestHost(req, opts: { xForwardedHost? })
- [x] getRequestProtocol(req, opts: { xForwardedProto? })
- [ ] getValidateQuery(req, validateFn)
- [x] isMethod(req, expected, allowHead?)

### Response

- [x] readRawBody(res, encoding)
- [x] readBody(res)
- [x] readFomData(res)
- [ ] readMultipartFormData(res)
- [x] readValidatedBody
- [x] appendHeaders(res, headers)
- [x] isStream(data) [Checks if the data is a stream. (Node.js Readable Stream, WebStream or React Pipeable Stream)]
- [x] sendRedirect(res, location, code?)
- [x] sendStream(res, stream)
- [ ] sendNoContent(res, code?)
- [ ] writeEarlyHints(res, hints, callback)
- [x] handleCacheHeaders(res, opts)

### Cookie Utils

- [x] deleteCookie(res, name, serializeOptions?)
- [x] getCookie(req, name)
- [x] setCookie(res)
- [x] parseCookies(req)

### Cors

- [x] appendCorsHeaders(res, options)
- [x] appendCorsPrelightHeaders(res, options)
- [x] handleCors(res, options)

### Proxy

- [ ] proxyRequest(res, req, opts)
- [ ] sendProxy(res, target, opts)