loopbackio / loopbackio/strong-error-handler

Customize HTML templates

Open
#3 5 comments 0 reactions 1 assignee Claimed by @davidcheung View on GitHub
feature help wanted needs-priority
Dominant language
JavaScript
Stars
38
Forks
36
Avg merge
1d 12h
Merged PRs (30d)
11

Description

Customize html templates in strong-error-handler, see https://github.com/strongloop/loopback/issues/1650#issuecomment-161920555 for details.

Configuration options:

``` js
// map of templates to use for rendering responses
views: {
// the default view
default: path.resolve(__dirname, 'views/error-default.jade'),
404: path.resolve(__dirname, 'views/error-not-found.jade'),
// etc.
},

// map of static files to send as a response
files: {
// default: path.resolve(__dirname, 'public/error.html'),
401: path.resolve(__dirname, 'views/error-unauthorized.html'),
// etc.
},
```

Requires #5

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.