Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

connect-jade-static

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-jade-static

Connect (expressjs) middleware for serving html files from jade template

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20
decreased by-44.44%
Maintainers
1
Weekly downloads
 
Created
Source

connect-jade-static Build Status

Connect (ExpressJS) middleware for serving jade files as static html

Installation

npm install connect-jade-static

Usage

Assume the following structure of your project:

/views
  /partials
    /file.jade

Let's make jade files from /views/partials web accessable:

Express prior to 4.0
var jadeStatic = require('connect-jade-static');

app = express();
app.configure(function() {
  app.use(jadeStatic({
    baseDir: path.join(__dirname, '/views/partials'),
    baseUrl: '/partials',
    maxAge: 86400,
    jade: { pretty: true }
  }));
});
Express 4.0
var jadeStatic = require('connect-jade-static');

app = express();
app.use(jadeStatic({
  baseDir: path.join(__dirname, '/views/partials'),
  baseUrl: '/partials',
  maxAge: 86400,
  jade: { pretty: true }
}));

Now, if you start your web server and request /partials/file.html in browser you should be able see the compiled jade template.


by http://adslot.com

Keywords

FAQs

Package last updated on 04 Mar 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc