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.
connect-docco
Advanced tools
docco middleware for connect. Mix it with socket.io and watch to get fancy automatic updates.
Bringing the literate programing tool docco as a connect/express middleware.
Nothing fancy, the idea is to generate dynamically upon request a docco generated page from files.
or simply to get immediate results of docco against local files, which happen to be quite handy.
** New Hot Stuff:** A mix of docco, socket.io and watch. Save files, get immediate results and see the docco page updated automatically.
npm install connect-docco
or if you intend to use the connect-docco bin, you may want to install globally: npm install connect-docco -g
connect-docco --port 5678 --dirname ../../any/folder/you/want
command line arguments overrides the defaults configuration:
Here is an example of a basic connect server setup using docco middleware with logger, static and directory.
connect.createServer()
.use(connect.logger())
.use(docco(__dirname))
.use(connect.directory(__dirname))
.use(connect.static(__dirname))
.listen(8080);
The middleware handle any docco-compatible extension and next()
to the
directory/static connect layers if the file extension is not one of the
following:
You'll have to append a docco querystring parameter (eg.
http://localhost:8082/path/to/js/files.js?docco
) to get the
output of docco for path/to/js/files.js
The docco middleware, if given an app
instance (that is the server
created by express/connect or http.createServer), will walk the dir and
watch for any file changes. It then emits back to clients the new content
to display.
var app = connect.createServer();
app
.use(connect.logger())
.use(docco(conf.dirname, {
// provides the app reference, so that we could add some socket.io sugar
app: app
}))
.use(connect.directory(conf.dirname))
.use(connect.static(conf.dirname))
.listen(conf.port);
This is basic, but ends up working pretty well.
FAQs
docco middleware for connect. Mix it with socket.io and watch to get fancy automatic updates.
The npm package connect-docco receives a total of 1 weekly downloads. As such, connect-docco popularity was classified as not popular.
We found that connect-docco 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.