Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/edocbuhtig/ionic5-socket.io

How to integrate Socket.io client to connect with Socket.io server inside your Ionic Framework 5.x app
https://github.com/edocbuhtig/ionic5-socket.io

ionic-framework socket-io

Last synced: about 3 hours ago
JSON representation

How to integrate Socket.io client to connect with Socket.io server inside your Ionic Framework 5.x app

Awesome Lists containing this project

README

        

### Socket.io nodejs server setup

cloce the repo browser to **nodesocketserver** folder

To install dependencies

```npm install```

To serve the app run

```npm start```

### Socket.io ionic5 client app setup

Install socket.io client dependency

```npm install socket.io-client --save```

Only one import is needed, in your component ts file as below,

```import * as io from 'socket.io-client';```

To test the app on the same wifi/network use,

```ionic serve --external```

Grab the url with ip address, and point your external device browser to this address.

## Screenshot

![Ionic v5 Demo](https://github.com/edocbuhtig/socket.io-ionic-client-nodejs-server/blob/master/screenshot/demoscreen.png)

## Ionic Info used for this repo
```
Ionic:

Ionic CLI : 6.1.0

Utility:

cordova-res : not installed
native-run (update available: 0.3.0) : 0.2.9

System:

NodeJS : v12.16.0
npm : 6.13.7
OS : macOS Catalina

```