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