write to server from client socket io code example
Example 1: socket io script
<script src="/socket.io/socket.io.js"></script>
<script>
const socket = io();
</script>
Example 2: simple socket.io chat
npm install socket.io
<script src="/socket.io/socket.io.js"></script>
<script>
const socket = io();
</script>
npm install socket.io