Aditya Verma

07/06/2023, 9:45 AM
I'm working on a Koltin multiplatform project targeting android and desktop (windows). For desktop module how can I connect to a server running on an express application deployed on cloud? Any working solutions would be highly appreciated. I've tried okhttp, ktor websockets and client but none seem to work for desktop. Stuck on it for two days now. Any help would be appreciated. This is my Index.js file for integrated express application-
Copy code
const app = require('express')();
const http = require('http').Server(app);
const io = require('<|>')(http, {
    cors: {
      origin: '*',
const port = process.env.PORT || 3000;

io.on('connection', (socket) => {
  console.log('user connected to socket')
  socket.on('chat message', msg => {
    io.emit('chat message', msg);


http.listen(port, () => {
  console.log(`<http://Socket.IO|Socket.IO> server running at <http://localhost>:${port}/`);