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
# Prepare system | |
apt-get update | |
apt-get upgrade | |
apt-get install build-essential | |
apt-get install cmake | |
apt-get install git | |
apt-get install pkg-config | |
# Grab frest opencv library | |
curl -sL https://github.com/Itseez/opencv/archive/master.zip > opencv.zip |
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 express = require('express'), | |
httpProxy = require('http-proxy'), | |
app = express(); | |
var proxy = new httpProxy.RoutingProxy(); | |
function apiProxy(host, port) { | |
return function(req, res, next) { | |
if(req.url.match(new RegExp('^\/api\/'))) { | |
proxy.proxyRequest(req, res, {host: host, port: port}); |