![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
backpage
Advanced tools
Readme
Naive static HTML streaming based on React for Node.js CLI applications.
BackPage renders your React application to HTML and streams updates (static HTML snapshots) to your browser.
It is designed for really simple GUI as a complementary to text logs, so user interaction is neither supported nor its goal.
npm install react backpage
main.tsx
import {BackPage} from 'backpage';
import React, {useState, useEffect} from 'react';
import {App} from './app.js';
const page = new BackPage();
page.render(<App />);
// Print page information including URL.
await page.guide();
// Send notification to browser (if connected).
page.notify('Hello BackPage!');
app.tsx
export const App = () => {
const [count, setCount] = useState(0);
useEffect(() => {
const timer = setInterval(
setCount(count => count + 1),
1000,
);
return () => clearInterval(timer);
}, []);
return <div>Count: {count}</div>;
};
By specifying a UUID as token, you can get a public URL from backpage.cloud:
import {BackPage, getPersistentToken} from 'backpage';
const page = new BackPage({
// You can also use any random UUID for temporary page.
token: await getPersistentToken(),
// Different pages can be setup using the same token with different names.
name: 'project-name',
});
await page.guide();
Note: backpage.cloud may introduce payments for significant network traffic to cover the expense in the future.
You can get notified if no browser is connected or the notification is not clicked within the timeout.
const page = new BackPage({
notify: {
timeout: 30_000,
fallback: notification => {
// Handle the notification manually.
// You can also return a webhook URL or request options to initiate an
// HTTP request.
return 'https://some.webhook/';
},
},
});
page.notify('Hello BackPage!');
<Title />
Setting the title of the page.
page.render(
<>
<Title>Awesome Page</Title>
<div>Hello BackPage!</div>
</>,
);
<Style />
Add a <style />
tag to the page with content loaded from src
.
const App = () => (
<>
<Style src={STYLE_PATH} />
<div>Hello BackPage!</div>
</>
);
<Console />
Intercepts console outputs using patch-console.
const App = () => (
<>
<h2>Logs</h2>
<Console />
</>
);
MIT License.
FAQs
Naive static HTML streaming based on React for Node.js CLI applications.
The npm package backpage receives a total of 0 weekly downloads. As such, backpage popularity was classified as not popular.
We found that backpage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.