
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A toolbar to connect your server to React

The toolbar shows a few key stats out of the box. If you're using express as a backend, you'll
automatically get the request time (req) and response time (res). This one is probably less
helpful, but it's there. Also included by default is the currently checked out git branch.
Import the component, and add it to your root component. It can go anywhere, but inside App is probably more semantic.
import { DevToolbar } from 'dev-bar';
...
export default props => {
<div>
<p>My Cool App</p>
<DevToolbar />
</div>
}
To not include the entire package in your client (until treeshaking gets better in webpack), you can also do
import DevToolbar from 'dev-bar/dist/DevToolbar';
The toolbar exposes a pretty basic middleware on the express side.
import { middleware as devToolbarMiddleware } from 'dev-bar';
...
const app = express();
app.use(devToolbarMiddleware());
Similarly to above, you can import this directly to reduce the size of your dependencies, but this shouldn't make too much different on a server.
import devToolbarMiddleware from 'dev-bar/dist/middleware';
To add your own values, pass an object into the middleware. You can either pass in raw values, or functions. One day soon, promises, too. If you want to get things out of the req or res, they're passed into your functions.
app.use(devToolbarMiddleware({
loggedIn: req => !!req.user,
apiVersion: 2,
}));
This will add loggedIn: true / apiVersion: 2 to your toolbar. Any values that exist as null or undefined will show up as 'undefined'.
You can use whatever backend you like, but you'll need to implement the socket connection yourself.
The default port is 3001. If you want a different port, pass in a port prop to the Toolbar component. You just need to emit an object under 'devUpdate'. Each key in the object will become a key in the toolbar. Keep it light.
To bind your socket to a different port, i.e. http://localhost:8080:
// import the DevToolbar component
<DevToolbar port={8080} />
Alternatively, if you want to specify a different URL completely, pass in the url prop. Note: this will override the port, if any is passed in.
FAQs
A toolbar at the bottom of your React apps with useful information.
The npm package dev-bar receives a total of 4 weekly downloads. As such, dev-bar popularity was classified as not popular.
We found that dev-bar demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.