Created
October 4, 2014 02:08
-
-
Save BretFisher/5ca9b19205432a8e5c1c to your computer and use it in GitHub Desktop.
Meteor HTTPS Proxy for running your own Linux server (not meteor.com, modulus.io, etc.)
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
// run this http-proxy npm package on same server as your meteor app | |
// I use demeteorizer to turn meteor bundle into full node app | |
// I use forever to run the meteor app and this app on same server | |
// only npm needed is http-proxy from nodejitsu | |
var fs = require("fs"); | |
var httpProxy = require('http-proxy'); | |
httpProxy.createServer({ | |
target: { | |
host: 'localhost', | |
port: 8000 // port Meteor should run on. | |
}, | |
ws: true, // yay web sockets ftw | |
ssl: { | |
key: fs.readFileSync("private.key"), // private key | |
ca: fs.readFileSync("intermediate.crt"), // intermediate if needed, optional | |
cert: fs.readFileSync("public.crt") // public cert | |
} | |
}).listen(8001); // the port SSL will be on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment