
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
pr-render-static
Advanced tools
@priestine/routing
Render Static ModuleThe pr-render-static
module allows rendering static files using @priestine/routing
.
yarn add @priestine/routing pr-render-static
It's as easy as registering a new GET route and assigning it
RenderStatic.from(/* static file directory */)
which returns an array of middleware
that will search for a file in the directory provided as the argument (this is relative to your package.json
),
set required MIME type and fire the response containing the data. If the file does not exist,
it will set status code to 404 and end the response with text/plain
Content-Type header.
import { HttpRouter } from '@priestine/routing';
import { RenderStatic } from 'pr-render-static';
const router = HttpRouter.empty()
.get(/^\/static\/.*/, RenderStatic.from('static'))
;
It is recommended to include RenderStatic
as the very last item in your router in case static files are not rendered
on a specific route (e.g. when you set up RenderStatic
for /^.*$/
) so that it is referred to as the last resort.
FAQs
@priestine/routing module for rendering static files
The npm package pr-render-static receives a total of 0 weekly downloads. As such, pr-render-static popularity was classified as not popular.
We found that pr-render-static 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.