This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// example Express server using the custom Fractal view engine | |
const express = require('express'); | |
const path = require('path'); | |
const appRoot = path.normalize(path.join(__dirname, '..')); | |
const app = express(); | |
const fractalEngine = require(path.join(appRoot, 'lib/fractal-engine')); | |
const loadComponents = require(path.join(appRoot, 'middleware/load-components')); | |
// register custom Fractal rendering engine | |
app.engine('fractal', fractalEngine); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- code ||= '' | |
%pre | |
%code.language-markup | |
= preserve do | |
:escaped | |
#{code} |