mirror of
https://github.com/Dannecron/hello-slack-bot.git
synced 2025-12-25 16:12:34 +03:00
some fix
This commit is contained in:
7
app.js
7
app.js
@@ -8,7 +8,6 @@ var fs = require('fs');
|
|||||||
var zmrBot = require('./bot.js');
|
var zmrBot = require('./bot.js');
|
||||||
|
|
||||||
var app = express();
|
var app = express();
|
||||||
var port = process.env.PORT || 3000;
|
|
||||||
var sslPath = '/etc/letsencrypt/live/sao.twilightparadox.com/';
|
var sslPath = '/etc/letsencrypt/live/sao.twilightparadox.com/';
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
@@ -32,8 +31,6 @@ app.use(function (err, req, res, next) {
|
|||||||
|
|
||||||
var server = https.createServer(options, app);
|
var server = https.createServer(options, app);
|
||||||
var io = require('socket.io').listen(server);
|
var io = require('socket.io').listen(server);
|
||||||
server.listen(443);
|
server.listen(443, function () {
|
||||||
|
console.log('start server. Listening for port 443')
|
||||||
app.listen(port, function () {
|
|
||||||
console.log('Slack bot listening on port ' + port);
|
|
||||||
});
|
});
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.16.1",
|
"body-parser": "^1.16.1",
|
||||||
"express": "^4.14.1"
|
"express": "^4.14.1",
|
||||||
|
"socket.io": "^1.7.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
Description=slackbot
|
Description=slackbot
|
||||||
After=network.target
|
After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/var/www/slackbot/app.js
|
ExecStart=/usr/bin/node /var/www/slackbot/app.js
|
||||||
Restart=always
|
Restart=always
|
||||||
User=nobody
|
RestartSec=10
|
||||||
Group=nobody
|
#User=nobody
|
||||||
Environment=PATH=/usr/bin:/usr/local/bin
|
#Group=nobody
|
||||||
|
#Environment=PATH=/usr/bin:/usr/local/bin
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
WorkingDirectory=/var/www/slackbot
|
WorkingDirectory=/var/www/slackbot
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
Reference in New Issue
Block a user