K
K
kartoshka112019-12-07 14:55:02
Node.js
kartoshka11, 2019-12-07 14:55:02

Why is there no response from node js (socket) + cloudflare?

Installed cloudflare on my site, then node js stopped working
Created a new certificate in cloudlare, updated certificates for node. I changed the port from 8080 to 8443, but after that nothing worked. There are no errors with
node.js:

var scribe = require('scribe-js')(),
    app = require('express')(),
    fs = require('fs'),
  ssl = {
        key: fs.readFileSync('privkey1.pem', 'utf8'),
        cert: fs.readFileSync('fullchain1.pem', 'utf8')
    },
    server = require('https').Server(ssl, app),
    io = require('socket.io')(server),
    requestify = require('requestify');

var schedule = require('node-schedule');
server.listen(8443);

html:
<script src="/files/js.cookie.js" type="text/javascript"></script>
    <script src="/files/socket.io-1.4.5.js"></script>
    <script>
        var socket = io.connect(':8443', {rememberTransport: false});
тут еще код...
</script>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question