-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demonstrate usage of the library in an example app
- Loading branch information
1 parent
d70ab47
commit 5901cc4
Showing
4 changed files
with
1,286 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const express = require('express'); | ||
const lookAndFeel = require('@hmcts/look-and-feel'); | ||
|
||
const app = express(); | ||
|
||
lookAndFeel.configure(app, { | ||
express: { views: ['views'] } | ||
}); | ||
|
||
app.get('/hello-world', (req, res) => { | ||
res.render('HelloWorld'); | ||
}); | ||
|
||
app.listen(3000); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "@hmcts/look-and-feel-test-app", | ||
"description": "Example app using look-and-feel", | ||
"version": "0.0.1", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=6.0" | ||
}, | ||
"scripts": { | ||
"start": "node app.js" | ||
}, | ||
"dependencies": { | ||
"express": "^4.15.3", | ||
"@hmcts/look-and-feel": "./../../" | ||
}, | ||
"devDependencies": {} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "govuk_template.html" %} | ||
{% from "patterns/header.njk" import header %} | ||
|
||
{% block content -%} | ||
{{ header("Hello World!") }} | ||
Hello World! | ||
{%- endblock %} |
Oops, something went wrong.