Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
static-cling
Advanced tools
This is a node.js module that allows you to spin up a static file server either from code or from the command line.
npm install static-cling
Don't forget to use the global flag (--g) if you want the command line option everywhere.
static
Yeah, that's it. You have the option to pass in -p for port, otherwise it defaults to port 3000, -d for directory, if you want to specify a different directory than the one you are in, and lastly -f for the default html page, this defaults to index.html
Static Cling is available to be used as a module as well if you want to use node to host static files.
require('static-cling')();
If using the module you can override the defaults by providing a config object
//defaults
var config = {
root: '.',
port: 3000,
filename: 'index.html'
}
const cling = require('static-cling')
//overriding defaults
cling({ port: 3456, root : './other/', filename: 'test.html' });
FAQs
Static file server
The npm package static-cling receives a total of 4,048 weekly downloads. As such, static-cling popularity was classified as popular.
We found that static-cling 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.