-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the iris-ws.js file to CDNJS #1047
Comments
Done @dibyendu , thank you a lot for this! P.S: I know how to convert typescript to javascipt and the opossite, I am a typescript enthusiast from the beginning of its life :P |
Hi @kataras please add the |
Oups sorry, your PR is merged, thank you a lot @dibyendu! |
Hi @kataras, there is a good news. The client side library <!doctype html>
<html>
<head>
- <script type="text/javascript" src="/iris-ws.js"></script>
+ <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/iris-ws/10.7.0/client.min.js"></script>
</head>
<body>
</body>
</html> Thanks |
That's wonderful news, so end-devs are not necessarily need to serve the |
UpdateAs of 11.2 release, the above ^ iris javascript file is obselete. Use that instead:
|
Hi, for the websocket client-side module, currently iris has one
.ts
file here: https://github.com/kataras/iris/blob/master/websocket/client.ts, which is embedded asjavascript
in theclient.go
fileiris/websocket/client.go
Line 24 in c0a1740
.go
file itself (on an endpoint called/iris-ws.js
).Here is a working snippet:
But it would be nice if we could host the client side javascript on some CDN and server it from there. CDNJS is one such free CDN service provider. But it appears that they only serve
Javascript
and NOTTypescript
or javascript embedded in.go
.I've already opened a request on CDNJS for hosting the
iris-ws.js
file. This is the issue: cdnjs/cdnjs#12884But since there is no
.js
file in the iris repository, they seem to be finding it difficult to host.Is it possible for you to add the
client.js
oriris-ws.js
file along with theclient.ts
file inhttps://github.com/kataras/iris/blob/master/websocket/
?The
client.ts
can be converted toiris-ws.js
as follows:or using this online service: https://www.typescriptlang.org/play
The text was updated successfully, but these errors were encountered: