Skip to content

Commit

Permalink
core: hbs-helpers, i10n and bug-fixes
Browse files Browse the repository at this point in the history
* optional **Sentry** integration (gh #2)
* allow to configure **Helmet**
* use [messageformat.js](https://github.com/messageformat/messageformat.js) for i18n
* use [Assemble](http://assemble.io/helpers/) as HBS-helpers collection (gh #17)

* move several functions to `/loaders`
* move default configuration to YAML file (easier to maintain and copy)
* rename tests (introduce `@volebo/mocha-helpers`)
* other refactoring stuff

#### Issues

* see #17 - HBS helpers
* see #2 - error handling
  • Loading branch information
maxkoryukov committed Oct 31, 2017
1 parent 879d25c commit 5bdcded
Show file tree
Hide file tree
Showing 7 changed files with 1,593 additions and 55 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@ This is the history of changes of the `@volebo/express` package

* optional **Sentry** integration (gh #2)
* allow to configure **Helmet**
* use [messageformat.js](https://github.com/messageformat/messageformat.js) for i18n
* use [Assemble](http://assemble.io/helpers/) as HBS-helpers collection (gh #17)

* move several functions to `/loaders`
* move default configuration to YAML file (easier to maintain and copy)
* rename tests (introduce `@volebo/mocha-helpers`)
* other refactoring stuff

#### Issues

* see #17 - HBS helpers
* see #2 - error handling

## 0.7.6 // 2017-10-27

* **rename to `@volebo/express`** (gh #10)
Expand Down
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,29 @@ Since the codebase isn't mature (at any level), it is better to use
Then, just follow this sample:

```javascript
"use strict";
'use strict'

// require the module:
const vbexpress = require('@volebo/express');
const vbexpress = require('@volebo/express')

const configPath = 'server/config.yaml'
const overrideOpts = {
'debug': true
}

// create an instance with appropriate options:
var app = vbexpress( { "options" : "your options here"} );
const app = vbexpress(configPath, overrideOpts)

// Add routes (no lang-handler):
const routes = require('./routes')
app.use('/', routes)

// Add routes:
var routes = require('./routes/index');
app.use('/', routes);
// Add routes with language-culture detection:
const routesL10N = require('./routes2')
app.lang.use('/', routesL10N)

// start handling
app.start();
app.start()
```

## Additional properties
Expand All @@ -56,7 +65,8 @@ Custom configuration of the server. It contains our own crutches and fixes.

#### `app.hbs`

Handlebars engine
Handlebars engine with registered [HBS-helpers](http://assemble.io/helpers/)
by [Assemble]-team

#### `app.lang`

Expand Down Expand Up @@ -106,6 +116,8 @@ All thanks and praises go to:
* [Express Handlebars](https://github.com/ericf/express-handlebars)
* [PassportJS] and Jared Hanson
* [Bunyan Logger][npm-bunyan]
* [MessageFormat] for their implementation of ICU standard (I18N/L10N)
* [Sentry] - awesome error collector

## License

Expand All @@ -116,3 +128,6 @@ Please, follow the link: [LICENSE](https://github.com/volebo/volebo-express/raw/
[npm-bunyan]: https://www.npmjs.com/package/bunyan

[PassportJS]: http://passportjs.org/
[Assemble]: http://assemble.io
[MessageFormat]: https://messageformat.github.io
[Sentry]: https://sentry.io
Loading

0 comments on commit 5bdcded

Please sign in to comment.