# bluegate-handlebars

> Handlebars templates for BlueGate applications

Latest version **1.0.0** (published 2016-11-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install bluegate-handlebars
pnpm add bluegate-handlebars
yarn add bluegate-handlebars
bun add bluegate-handlebars
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-11-04 |
| First published | 2016-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.12.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Maurits Lawende |
| Maintainers | mauritsl |
| Keywords | bluegate, handlebars, templates |

## Links

- npm: https://www.npmjs.com/package/bluegate-handlebars
- Repository: https://github.com/mauritsl/bluegate-handlebars
- Homepage: https://github.com/mauritsl/bluegate-handlebars#readme
- Issues: https://github.com/mauritsl/bluegate-handlebars/issues
- npm.io page: https://npm.io/package/bluegate-handlebars

## Dependencies (4)

- [globby](https://npm.io/package/globby.md) ^6.0.0
- [lodash](https://npm.io/package/lodash.md) ^4.13.1
- [bluebird](https://npm.io/package/bluebird.md) ^3.4.1
- [handlebars](https://npm.io/package/handlebars.md) ^4.0.5

## Recent versions

- 1.0.0 (latest) — 2016-11-04

## README

BlueGate Handlebars
==================

[![Build Status](https://travis-ci.org/mauritsl/bluegate-handlebars.svg?branch=master)](https://travis-ci.org/mauritsl/bluegate-handlebars)
[![Coverage Status](https://coveralls.io/repos/github/mauritsl/bluegate-handlebars/badge.svg?branch=master)](https://coveralls.io/github/mauritsl/bluegate-handlebars?branch=master)
[![Dependency Status](https://david-dm.org/mauritsl/bluegate-handlebars.svg)](https://david-dm.org/mauritsl/bluegate-handlebars)
[![Known Vulnerabilities](https://snyk.io/test/github/mauritsl/bluegate-handlebars/badge.svg)](https://snyk.io/test/github/mauritsl/bluegate-handlebars)

Render responses with [Handlebars](http://handlebarsjs.com/) templates
in a [BlueGate](https://www.npmjs.com/package/bluegate) application.

## Installation

Install using ``npm install bluegate-handlebars``

## Quick example

Save templates in ``/templates`` folder with a ``.hbs`` extension.

```javascript
var BlueGate = require('bluegate');
var app = new BlueGate();
app.listen(8080);

require('bluegate-handlebars')(app);

app.process('GET /', function() {
  this.setParameter('template', 'homepage');
  return {title: 'Test'};
});
```

Template in ``/templates/homepage.hbs``:
```javascript
<h1>{{title}}</h1>
```

The template name used in the parameter is the filename of the template, without extension.

## Custom options

A ``files`` option can be provided to indicate where the template files can be found.
This pattern is parsed by the [globby](https://www.npmjs.com/package/globby) module.

```javascript
require('bluegate-handlebars')(app, {
  files: 'templates/**/*.hbs'
});
```

---
_Source: https://npm.io/package/bluegate-handlebars · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
