Created
November 14, 2013 03:24
-
-
Save mikermcneil/7460835 to your computer and use it in GitHub Desktop.
/** * An example of how to use a CA certificate in your Sails app. * * Would love to see support for the `ca` key on the main ssl config object * (if you write it up, please just send the PR to the associations branch so it's easier to merge-- thanks!) */
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
/** | |
* An example of how to use a CA certificate in your Sails app. | |
* | |
* Would love to see support for the `ca` key on the main ssl config object | |
* (if you write it up, please just send the PR to the associations branch so it's easier to merge-- thanks!) | |
*/ | |
var fs = require('fs'); | |
//config/express.js | |
module.exports = { | |
express: { | |
// Expects certificates thrown in the root of your Sails app | |
serverOptions: { | |
ca: fs.readFileSync(__dirname + '/../gd_bundle.crt'), | |
key: fs.readFileSync(__dirname + '/../yourApp.key'), | |
cert: fs.readFileSync(__dirname + '/../yourApp.crt') | |
} | |
} | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment