Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/techmely/uwebsocket-use
- Owner: techmely
- License: mit
- Created: 2024-03-09T10:19:38.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-13T07:26:15.000Z (9 months ago)
- Last Synced: 2024-05-08T00:15:28.146Z (8 months ago)
- Language: TypeScript
- Size: 1.06 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
- [ ] CookieSpecific 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)