See Configuring NGINX to accept the PROXY Protocol - NGINX
upstream wsserver {
server 127.0.0.1:9000;
}
var https = require('https'); | |
var util = require('util'); | |
exports.handler = function (event, context) { | |
console.log(JSON.stringify(event, null, 2)); | |
console.log('From SNS:', event.Records[0].Sns.Message); | |
var severity = "good"; | |
var message = event.Records[0].Sns.Message; | |
var messageJSON = JSON.parse(message); |
import React from 'react'; | |
import { connect } from 'react-redux'; | |
class PageWidget extends React.Component { | |
componentDidMount() { | |
this.ifr.onload = () => { | |
this.ifr.contentWindow.postMessage('hello', '*'); | |
}; | |
window.addEventListener("message", this.handleFrameTasks); | |
} |
import boto3 | |
import botocore | |
from boto3.s3.transfer import S3Transfer | |
def lookup(s3, bucket_name): | |
try: | |
s3.meta.client.head_bucket(Bucket=bucket_name) | |
except botocore.exceptions.ClientError as e: | |
error_code = int(e.response['Error']['Code']) |
See Configuring NGINX to accept the PROXY Protocol - NGINX
upstream wsserver {
server 127.0.0.1:9000;
}
var express = require('express'); | |
var app = express(); | |
var fs = require('fs'); | |
app.listen(3000, function() { | |
console.log("[NodeJS] Application Listening on Port 3000"); | |
}); | |
app.get('/api/play/:key', function(req, res) { | |
var key = req.params.key; |