0.1.7 • Published 10 months ago

@ossph/temple-express v0.1.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
10 months ago

⛩️ Temple Express

This package is designed for Temple, the reactive web component template engine. See docs for more information.

Temple plugin for Express and native HTTP.

Install

$ npm -i @ossph/temple-express

Usage

import path from 'path';
import express from 'express';
import { view } from '@ossph/temple-express';

//create temple compiler
const compiler = temple({ cwd: __dirname, minify: false });
//create express app
const app = express();

//let's use express' template engine feature
app.engine('dtml', view(compiler));
//set the view engine to temple
app.set('views', path.join(__dirname, 'templates'));
app.set('view engine', 'dtml');
//..other routes
app.listen(3000, () => {
  console.log('Server is running on http://localhost:3000');
});
0.1.7

10 months ago

0.1.6

10 months ago

0.1.4

10 months ago

0.1.5

10 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago