
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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.
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.