mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
Add "release" badge at README.md
Former-commit-id: 0344c998a68284bb0310da4b0131fdc1aec7c64a
This commit is contained in:
@@ -6,6 +6,7 @@ go:
|
||||
# - go1.8 works of course but
|
||||
# we must encourage users to update to the latest go version,
|
||||
# so examples are running on go 1.9 mode.
|
||||
- go1.9
|
||||
- tip
|
||||
go_import_path: github.com/kataras/iris
|
||||
install:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!-- #  Iris
|
||||
-->
|
||||
<p align="center">
|
||||
#  Iris
|
||||
|
||||
<!-- <p align="center">
|
||||
<img src="iris_the_new_machine.gif">
|
||||
</p>
|
||||
</p> -->
|
||||
|
||||
Iris is a fast, simple and efficient micro web framework for Go. It provides a beautifully expressive and easy to use foundation for your next website, API, or distributed app.
|
||||
|
||||
@@ -26,6 +26,7 @@ Iris may have reached version 8, but we're not stopping there. We have many feat
|
||||
[](http://goreportcard.com/report/kataras/iris)
|
||||
[](https://github.com/kataras/iris/issues?q=is%3Aopen+is%3Aissue)
|
||||
[](https://github.com/kataras/iris/issues?q=is%3Aissue+is%3Aclosed)
|
||||
[](https://github.com/kataras/iris/releases)
|
||||
[](https://github.com/kataras/iris/tree/master/_examples)
|
||||
[](https://kataras.rocket.chat/channel/iris)
|
||||
|
||||
|
||||
@@ -3,11 +3,16 @@
|
||||
<pre id="output"></pre>
|
||||
<script src="/iris-ws.js"></script>
|
||||
<script>
|
||||
var scheme = document.location.protocol == "https:" ? "wss" : "ws";
|
||||
var port = document.location.port ? (":" + document.location.port) : "";
|
||||
// see app.Get("/echo", ws.Handler()) on main.go
|
||||
var wsURL = scheme + "://" + document.location.hostname + port+"/echo";
|
||||
|
||||
var input = document.getElementById("input");
|
||||
var output = document.getElementById("output");
|
||||
|
||||
// Ws comes from the auto-served '/iris-ws.js'
|
||||
var socket = new Ws("ws://localhost:8080/echo");
|
||||
var socket = new Ws(wsURL)
|
||||
socket.OnConnect(function () {
|
||||
output.innerHTML += "Status: Connected\n";
|
||||
});
|
||||
@@ -22,7 +27,7 @@
|
||||
});
|
||||
|
||||
function send() {
|
||||
addMessage("Me: "+input.value) // write ourselves
|
||||
addMessage("Me: " + input.value) // write ourselves
|
||||
socket.Emit("chat", input.value);// send chat event data to the websocket server
|
||||
input.value = ""; // clear the input
|
||||
}
|
||||
@@ -30,4 +35,5 @@
|
||||
function addMessage(msg) {
|
||||
output.innerHTML += msg + "\n";
|
||||
}
|
||||
</script>
|
||||
|
||||
</script>
|
||||
@@ -783,8 +783,7 @@ func (api *APIBuilder) StaticWeb(requestPath string, systemPath string) *Route {
|
||||
}
|
||||
}
|
||||
|
||||
requestPath = joinPath(fullpath, WildcardParam(paramName))
|
||||
// requestPath = fullpath + "/{file:path}"
|
||||
requestPath = joinPath(requestPath, WildcardParam(paramName))
|
||||
return api.registerResourceRoute(requestPath, handler)
|
||||
}
|
||||
|
||||
|
||||
@@ -34,10 +34,6 @@ func (e *emitter) EmitMessage(nativeMessage []byte) error {
|
||||
}
|
||||
|
||||
func (e *emitter) Emit(event string, data interface{}) error {
|
||||
if e.conn.server.rooms[e.to] == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
message, err := websocketMessageSerialize(event, data)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user