npm install pomelo-https-plugin
{
"development": {
...
"http": [
{
"id": "http-server-0",
"host": "127.0.0.1",
"port": 5000,
"httpHost": "127.0.0.1",
"httpPort": 80
}
]
},
"production": {...}
}
[
...
{
"type": "http",
"token": "agarxhqb98rpajloaxn34ga8xrunpagkjwlaw3ruxnpaagl29w4rxn"
}
]
...
const httpPlugin = require('pomelo-http-plugin');
...
app.configure('development', 'http', function () {
app.use(httpPlugin, {
http: {
useSSL: false
}
});
});
module.exports = function(app, http) {
http.get('/test', function (req, res, next) {
res.send('http success');
next();
});
};
{
"development": {
...
"http": [
{
"clusterCount": 2,
"id": "http-server-0",
"host": "127.0.0.1",
"port": "5000++",
"httpHost": "127.0.0.1",
"httpPort": "80++"
}
]
},
"production": {...}
}