Socket
Socket
Sign inDemoInstall

express-lml

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    express-lml

Express view engine for LML - an HTML alternative


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
117 kB
Created
Weekly downloads
 

Readme

Source

express-lml

Express view engine for LML - an HTML alternative

Install

In your express.js project directory: npm install express-lml --save-dev

Usage

use the exported loader and pass your express app instance: loadViewEngine(app);

You can also pass options for parsing and output (to minify, order attributes etc): loadViewEngine(app, {parse: parseConfig, output: outputConfig}); See LML README for available options.

Example

views/index.lml:

!DOCTYPE html
html
  head
    title ; hello
  body
    h1 ; hello world!

app.js:

const express = require('express');
const expressLML = require('express-lml');

const app = express();
const port = 3000;

expressLML.loadViewEngine(app);

// default folder for your LML files
app.set('views', './views');

app.get('/', function (req, res) {
  res.render('index');
});

app.listen(port, () => console.log(`Example app listening on port ${port}!`));

Keywords

FAQs

Last updated on 12 Jan 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc