![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.
@randlabs/js-metrics
Advanced tools
Metrics is a lightweight web server that provides health status and Prometheus-compatible reports.
npm install --save @randlabs/js-metrics
const Metrics = require("@randlabs/js-metrics");
const metricsServer = await Metrics.createServer(options);
const Metrics = require("@randlabs/js-metrics");
const metricsServer = await Metrics.createServer({
host: "127.0.0.1",
port: 3001,
accessToken: "1234",
endpoints: {
getHealth: "/health",
getStats: "/metrics",
},
getHealthCallback: () => {
return {
value: Math.random() * 100
};
},
metricsSetupCallback: (registry) => {
const g = new promclient.Gauge({
name: 'test_gauge',
help: 'Example of a gauge',
registers: [ registry ]
});
g.set(Math.random() * 100);
}
});
// do other stuff
await metricsServer.shutdown();
Create a new metrics web server with the given options
.
options
- Initialization options.options.host
- Bind address. Defaults to 127.0.0.1. Not used in cluster workers.options.port
- Specifies the server port. Not used in cluster workers.options.accessToken
- Protect access to endpoints with an access token. Optional. Not used in cluster workers.options.usingClusters
- If the app runs inside a cluster environment, set this option to true.options.endpoints
- Overrides the endpoints paths. Optional. Not used in cluster workers.options.endpoints.getHealth
- Overrides the "/health" url path. Optional.options.endpoints.getStats
- Overrides the "/stats" url path. Optional.options.getHealthCallback
- Callback function called when health information is required. It must return a HealthStatus
object.options.metricsSetupCallback
- Callback function called to initialize Prometheus metrics. It receives a registry
objects where collectors must be added.Apache 2.0
FAQs
Metrics & Health Mini Server
The npm package @randlabs/js-metrics receives a total of 1 weekly downloads. As such, @randlabs/js-metrics popularity was classified as not popular.
We found that @randlabs/js-metrics demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.