V
V
Vitaly2017-05-16 12:56:28
JavaScript
Vitaly, 2017-05-16 12:56:28

How to run socket server in chrome extension?

All the best! I found mentions of socket servers in the documentation, but somehow I can’t start it :( I would be grateful for a small example

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chelkaz, 2017-05-16
@chelkaz

Look towards the Centrifuge https://centrifugo.herokuapp.com/#/
In the application (extension), connect to the server, and send notifications from the server.
https://fzambia.gitbooks.io/centrifugal/content/cl...
It's very simple: For example, in the extension, just specify your server and the necessary parameters:

var centrifuge = new Centrifuge({
        url: 'http://ваш сервер от куда посылать будите/connection',
        user: "USER ID",
        timestamp: "UNIX TIMESTAMP SECONDS",
        token: "SHA-256 HMAC TOKEN"
    });

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question