hnasr / javascript_playground Goto Github PK
View Code? Open in Web Editor NEWJavascript playground tutorials
Javascript playground tutorials
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2020/10/17 11:50:56 [error] 28#28: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3001/", host: "localhost:8080"
2020/10/17 11:50:56 [error] 28#28: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3001/", host: "localhost:8080"
2020/10/17 11:50:56 [error] 28#28: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3002/", host: "localhost:8080"
2020/10/17 11:50:56 [error] 28#28: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3002/", host: "localhost:8080"
2020/10/17 11:50:56 [error] 28#28: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3003/", host: "localhost:8080"
2020/10/17 11:50:56 [error] 28#28: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3003/", host: "localhost:8080"
172.17.0.1 - - [17/Oct/2020:11:50:56 +0000] "GET / HTTP/1.1" 502 157 "-" "PostmanRuntime/7.26.5"
I configured relay and the haproxy to load balance streams. However, when I load up the streams in VLC or web browser, round robin doesn't happen. All streams stay on Server1. Why aren't they being routed to Server2. Anyone know why?
Hello Everyone, I want to ask something about NAT bypassing that is done with STUN servers in WebRTC and the question is. Does not Router delete the NAT Table entries after getting a response from the server? and if yes then how can someone connect through that same entry.
Hi,
I am getting this below error:
λ node publisher.js OperationalError: Socket closed abruptly during opening handshake at Socket.endWhileOpening (D:\misc\htdocs\git-public-repos\javascript_playground\rabbitmq\node_modules\amqplib\lib\connection.js:260:17) at Socket.emit (events.js:322:22) at endReadableNT (_stream_readable.js:1187:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) { cause: Error: Socket closed abruptly during opening handshake at Socket.endWhileOpening (D:\misc\htdocs\git-public-repos\javascript_playground\rabbitmq\node_modules\amqplib\lib\connection.js:260:17) at Socket.emit (events.js:322:22) at endReadableNT (_stream_readable.js:1187:12) at processTicksAndRejections (internal/process/task_queues.js:84:21), isOperational: true }
FYI, my rabbitmq is successfully running on http://localhost:15672/
javascript_playground/sharding/index.js
Line 65 in bc01f3c
@hnasr base64 encoding used in the URL shortener may have a '/' un the URL_ID, so using digest('base64url') is advised to avoid this.
I have followed your steps for image creation and docker compose. but i got the error
ws_lb_1 exited with code 1. i have attached docker compose result.
websocketscallingerror.txt
PeerB.js replace the following line
const receiveChannel = event.channel;
with
const receiveChannel = e.channel;
Running this code on the DevConsole
let ws = const ws = new WebSocket("ws://localhost:8080")
returns WebSocket connection to 'ws://localhost:8080/' failed
My question is that how can i make a chat app using webrtc that work on wide area network. The provided code by Sir @hnasr is only applicable on same device on different browsers. What changes should be done in order to establish communication between two different devices?
you forgot instruction in readme
Hello,
First of appreciation for all your good work.
I however want to to transfer my SocketIO code which is currently running on HTTPS 1.1 to HTTP2 and I am using express. You have defined everything regarding setting up HTTP2 Socket really well. But you did not define how to use Socket on and emit events in HTTP2. I have been searching for it since 2 days but no luck. Kindly help me out.
Thank you so much. Waiting for your reply.
Best Regards,
Masroor Ejaz.
PeerA.js replace urls with url and credentials with credential in the following code.
iceConfiguration.iceServers.push({
url: 'turn:my-turn-server.mycompany.com:19403',
username: 'optional-username',
credential: 'auth-token'
})
Also replace
urls: 'turn:stun1.l.google.com:19302'
with
'url': 'stun:stun.l.google.com:19302'
OS: Ubuntu 20.04LTS
Nginx version: nginx/1.18.0 (Ubuntu)
Even after changing http to stream in the nginx.conf while creating the layer 4 load balancer I was getting this error:-
nginx: [emerg] unknown directive "stream" in /etc/nginx/nginx.conf
I found a solution to that here
If you are facing the error then add this line on top of nginx.conf:-
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
and restart Nginx with sudo nginx -s reload
It should work now.
Creating this issue so that if anyone is facing same problem then this should solve that.
I think just we need to change the @type under type_config to be
'@type': "type.googleapis.com/envoy.config.filter.network.tcp_proxy.v3.TcpProxy"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.