https://github.com/halfzebra/express-elm
Express Elm Template Engine
https://github.com/halfzebra/express-elm
elm expressjs template-engine
Last synced: 3 months ago
JSON representation
Express Elm Template Engine
- Host: GitHub
- URL: https://github.com/halfzebra/express-elm
- Owner: halfzebra
- Created: 2017-09-27T07:53:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-27T21:53:28.000Z (almost 9 years ago)
- Last Synced: 2025-01-20T10:14:11.492Z (over 1 year ago)
- Topics: elm, expressjs, template-engine
- Language: JavaScript
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express Elm Template Engine
Purely Functional templates for [express](https://github.com/expressjs/express) framework.
## Installation
```bash
npm install express-elm --save
```
## Usage
```js
const express = require('express');
const path = require('path');
const elmRenderer = require('express-elm');
const app = express();
app.engine('elm', elmRenderer);
app.set('view engine', 'elm');
app.set('views', path.join(__dirname, 'views'));
app.get('/', (req, res) => {
res.render('MyModule', { model: { age: 24, name: 'Noah' } })
});
```
Check out a fully functioning [example.](/example)