Registry / web-framework / masonry

masonry

JSON →
library0.1.2jsnpmunverified

Masonry is a lightweight templating middleware for Express/Connect that wraps EJS templates, last published in 2013 at version 0.0.2. It reads template files into memory from a specified directory and adds a res.render() method. Deprecated by modern view engine integration in Express 3+. No updates since early Node 0.6 era; unmaintained.

npm install masonry
INSTALL
IMPORT
SIG · MASONRY
M
masonry
web-frameworkjavascriptv0.1.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const masonry = require('masonry')
import masonry from 'masonry'
CJS module; no default export for ESM
masonry
const masonry = require('masonry')
Only CJS supported; no named exports

Sets up Express with Masonry middleware, renders an EJS template.

var express = require('express'); var masonry = require('masonry'); var app = express(); app.use(masonry(__dirname + '/templates')); app.get('/', function(req, res) { res.render('index.ejs', { name: 'World' }); }); app.listen(3000);
Debug
Known issues
deprecatedMasonry is abandoned; no updates since 2013. Use Express view engine or consolidates instead.
fix
Use app.set('view engine', 'ejs') with Express built-in view engine or switch to consolidate.js.
affects: >=0.0.0
gotchaMasonry's res.render() overwrites Express's default res.render() method.
fix
Be aware that the signature differs: returns via callback or sends directly; incompatible with Express 4+ internal view system.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'underscore'
Masonry incorrectly lists underscore as a dependency in older versions but does not require it.
fix
Ensure underscore is installed: npm install underscore, or ignore if not used.
TypeError: res.render is not a function
Masonry middleware not applied or loaded after Express routes.
fix
Apply masonry middleware before route definitions.
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
ejsrequiredRequired for template rendering; loaded via dependency
Agent activity
2 hits · last 30 days
node
2
Resources
masonry — npm install masonry · libregistry