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
[root@cec3628f4838 /]# curl localhost:8001 | |
{"timers":{"running":0,"pending":5},"configuration":{"pg_password":"******","cassandra_lb_policy":"RoundRobin","cassandra_port":9042,"serf_path":"serf","nginx_kong_conf":"\/usr\/local\/kong\/nginx-kong.conf","admin_ssl_cert_csr_default":"\/usr\/local\/kong\/ssl\/admin-kong-default.csr","admin_ssl_port":8444,"proxy_port":8000,"admin_listen":"0.0.0.0:8001","latency_tokens":true,"ssl_cert_default":"\/usr\/local\/kong\/ssl\/kong-default.crt","cassandra_repl_factor":1,"cluster_profile":"wan","upstream_keepalive":60,"lua_package_cpath":"","cassandra_consistency":"ONE","cassandra_schema_consensus_timeout":10000,"admin_ssl_cert_default":"\/usr\/local\/kong\/ssl\/admin-kong-default.crt","pg_host":"kong.crizfo7qyx6w.eu-west-1.rds.amazonaws.com","pg_port":5432,"cluster_ttl_on_failure":3600,"nginx_err_logs":"\/usr\/local\/kong\/logs\/error.log","plugins":{"syslog":true,"ldap-auth":true,"rate-limiting":true,"correlation-id":true,"jwt":true,"request-termination":true,"runscope":tr |
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
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
# Change example.com (server_name) to your website url | |
# Change /path/to/your/root to the correct value | |
server { | |
listen 80; | |
server_name example.com; | |
root /path/to/your/root; | |
index index.html; |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name yourserver.com; | |
root /path/to/your/htdocs; | |
error_page 404 /404.html | |
index index.html; |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
'use strict'; | |
var mongoose = require('mongoose'); | |
var config = require('../config/database.json'); | |
var database = null; | |
var RSVP = require('rsvp'); | |
module.exports = { | |
init: function(envSt) { | |
if (database == null) { | |
var env = config[envSt]; |
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
fs = require 'fs' | |
path = require 'path' | |
Instance = -> | |
# cache for templates, express 3.x doesn't do this for us | |
@cache = {}; | |
@__express = middleware.bind(@) | |
return | |
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
hbs = require 'hbs' | |
#for css | |
hbs.registerHelper 'css', (file, media) -> | |
media = "all" unless media.substring? | |
st = '' | |
require('xml2js').parseString css(file), (err, xml) -> | |
st = """<link href="#{xml.link.$.href}" media="#{media}" rel="stylesheet" type="text/css"/>""" | |
st |
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
var mongodb = require('mongodb'); | |
var database; | |
module.exports = { | |
init: function(host, ip, db_name){ | |
if (database == undefined){ | |
var serverOptions = { | |
'auto_reconnect': true, | |
'poolSize': 5 | |
}; | |