What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-04 14:12:09
Module not found: Error: Can't resolve 'laravel-echo' in 'D:\Open Server\domains\laraveluzh.loc\resources\js'
I needed to install below packages. npm install -g laravel-echo-server then following the step by step instruction as give here Finally put below code before any js file. <script src="http://{{ Request::getHost() }}:6001/socket.io/socket.io.js&... Add solution -
-
-
Javascript 2021-10-27 02:24:07
socket.io react
import React, { useState, useEffect } from "react"; import socketIOClient from "socket.io-client"; const ENDPOINT = "http://127.0.0.1:4001"; function App() { const [response, setResponse] = useState(""); useEf... Add solution -
-
Javascript 2021-10-20 06:34:05
call node js function from javascript
var io = require('socket.io').listen(80); // initiate socket.io server io.sockets.on('connection', function (socket) { socket.emit('news', { hello: 'world' }); // Send data to client // wait for the event raised by the client socket.on('my other e... Add solution -