Серверная часть
// Express
const express = require('express');
const helmet = require('helmet');
const bodyParser = require('body-parser');
const PORTs = 8433;
// app
const app = express();
app.disable('x-powered-by');
app.set('trust proxy', 1);
app.use(helmet());
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
app.use(function(req, res, next) {
req.result = {errors: []};
next();
})
// Routes
app.use('/api', require('./routes/index'));
// Error handling
app.use(require('./controllers/error_handling'));
app.use(require('./controllers/error_404'));
// Create Server
const httpsServer = require('https').createServer(credentials, app); // https
// Socket io
const io = require('socket.io')(httpsServer, {
path: '/socket'
});
io.on('connection', socket => {
console.log('user socket connected: ', socket);
})
// Listen
httpsServer.listen(PORTs, () => console.log(`App started on port ${PORTs}`)); // https
Клиентская часть
import VueSocketIO from 'vue-socket.io'
Vue.use(new VueSocketIO({
debug: true,
connection: 'https://aaa.ru:8433',
vuex: {
store,
actionPrefix: 'SOCKET_',
mutationPrefix: 'SOCKET_'
},
options: { path: '/socket' }
}))
Подключение не происходит и даже не могу понять проблема в серверной или клиентской части
Может я не вижу очевидную ошибку?