@onenorth/keystone-hosting
One North KeystoneJS Hosting
Last updated 2 years ago by rhaskellglatz .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @onenorth/keystone-hosting 
SYNC missed versions from official npm registry.

onenorth-keystone-hosting

This is an NPM module that provides One North Hosting functionality for KeystoneJS applications.

Installation

npm install --save @onenorth/keystone-hosting

API

'trust proxy' is required when behind a proxy. Set this to enable processing of the HTTP request X-Forwarded-For header.

var keystone = require('keystone');
var hosting = require('@onenorth/keystone-hosting');
...
keystone.init({
    ...
    'trust proxy': true
});
...
hosting.register(keystone);
keystone.start();

Configuration

The following environment variables need to be set

ANONYMOUS_ACCESS_BLOCKER_ENABLED=true
ANONYMOUS_ACCESS_BLOCKER_ALLOWED_IP_RANGES=127.0.0.1/32 ::1

HEALTH_CHECK_ENABLED=true
HEALTH_CHECK_PATH={application path}
HEALTH_CHECK_KEYSTONE_USER_EMAIL={email address}
HEALTH_CHECK_AMAZON_TEST_FILE={filename}
HEALTH_CHECK_AZURE_TEST_FILE={filename}
HEALTH_CHECK_CLOUDINARY_TEST_FILE={filename}

LOG41N_CLIENT_ID={client id}
LOG41N_CLIENT_SECRET={client secret}
LOG41N_ENABLED=true
LOG41N_ENDPOINT={log41n endpoint}
LOG41N_PATH={application path}

Examples

var keystone = require('keystone');
var hosting = require('@onenorth/keystone-hosting');
...
keystone.init({
    ...
    'trust proxy': true
});
...
hosting.register(keystone);
keystone.start();

License

The associated code is released under the terms of the MIT license.

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (9)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |