![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
A simple http library for typescript
npm install --save http4js
#or
yarn add http4js
An example server and client
//define our server routes and start on port 3000
//GET to any path returns `GET to {PATH} with req headers {HEADERS}`
const routing = routes(Method.GET, ".*", (req: Request) => {
const html = `<h1>${req.method} to ${req.uri.path()} with req headers ${Object.keys(req.headers)}</h1>`;
return Promise.resolve(new Response(Status.OK, html));
})
//add csrf token header to every request and vary gzip to every response
const headerFilter = (handler: HttpHandler) => {
return (req: Request) => {
return handler(req.withHeader(Headers.X_CSRF_TOKEN, Math.random()))
.then(response => response.withHeader(Headers.VARY, "gzip"));
}
};
routing.withFilter(headerFilter)
.asServer()
.start();
//make an http request to our server and log the response
HttpClient(
new Request(Method.GET, "http://localhost:3000/any/path")
).then(response => {
console.log(response);
console.log(response.bodyString());
});
/*
//response
Response {
headers:
{ vary: 'gzip',
date: 'Sun, 08 Apr 2018 08:26:20 GMT',
connection: 'close',
'transfer-encoding': 'chunked' },
body: ''<h1>GET to /any/path with req headers host,connection,content-type,x-csrf-token</h1>'',
status: 200 }
//response.bodyString()
<h1>GET to /any/path with req headers host,connection,x-csrf-token</h1>
*/
I'd be very happy if you'd like to contribute :)
git clone git@github.com:TomShacham/http4js.git
cd http4js
yarn #or npm install
yarn start #or tsc; node index.js
yarn
yarn test
http4js is a port of http4k.
The concept is called Server as a Function (SaaF).
Early ideas and influence from Daniel Bodart's Utterly Idle
FAQs
A lightweight HTTP toolkit
We found that http4js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.