Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 01:01

    kataras on master

    i18n several improvements trig… (compare)

  • 00:57

    kataras on v12

    i18n several improvements trig… (compare)

  • Nov 21 19:51

    kataras on master

    implement path prefx for i18n m… remove github workflow as it re… add tests for #1369 and various… and 7 more (compare)

  • Nov 21 19:50

    kataras on v12

    remove lgtm file as this server… minor (compare)

  • Nov 20 17:02

    kataras on v12

    add lgtm? (compare)

  • Nov 20 14:40

    kataras on v12

    add subdomain support for i18n … (compare)

  • Nov 20 12:40

    kataras on v12

    fix #1395 (compare)

  • Nov 20 00:51

    kataras on v12

    update faq, contributing and go… (compare)

  • Nov 20 00:43

    kataras on v12

    minor (compare)

  • Nov 20 00:36

    kataras on v12

    add tests for #1369 and various… (compare)

  • Nov 19 21:49

    kataras on v12

    remove github workflow as it re… (compare)

  • Nov 19 21:36

    kataras on v12

    implement path prefx for i18n m… (compare)

  • Nov 14 18:16

    kataras on master

    README: add testimonials gif (compare)

  • Nov 14 18:16

    kataras on v12

    README: add testimonials gif (compare)

  • Nov 13 17:19

    kataras on master

    Add socket.io example Merge branch 'master' into v12 (compare)

  • Nov 13 17:19

    kataras on v12

    Modify core/router/api_builder.… _examples/file-server update to… Merge pull request #1393 from F… and 1 more (compare)

  • Nov 13 17:18

    kataras on v12

    Add socket.io example (compare)

  • Nov 13 17:17

    kataras on master

    Modify core/router/api_builder.… _examples/file-server update to… Merge pull request #1393 from F… (compare)

  • Nov 13 17:17
    kataras closed #1393
  • Nov 13 17:15
    kataras synchronize #1393
shanyujie
@shanyujie
then I use "go get -u -v github.com/kataras/iris" to install the iris
Connor Wright
@cxnky
how well does this perform under high load? (e.g. 10k-20k req/s)
shanyujie
@shanyujie
2.jpg
1.jpg
@kataras when I use the vscode to code ,the vscode can't find the new version iris to import.how to solve or am I using go mod in the wrong way?thanks for your work.
Gerasimos (Makis) Maropoulos
@kataras
@cxnky There are benchmarks online, 10k-20k req/s is an easy task for Iris (always depending on the backed code of course). Check out our wiki: https://github.com/kataras/iris/wiki/Benchmarks and benchmarks articles at: https://github.com/kataras/iris/wiki/Publications.
@majidbigdeli I thank you for the support on Iris and on Neffos with your feature requests and more!!!

@shanyujie I've just tried to install iris v11.2.2 on a clean machine and it worked perfectly. So I assume it has to do with your local go cache, please try to clear your go cache: $GOPATH/src/pkg/mod.

About your second question, I don't use that plugin, I use the vscode-go plugin and it works perffectly, just import "github.com/kataras/iris" and type iris. and you will see the autocomplete definitions. You may want to post this issue on the vscode plugin you're using.

@code4jorg Please open an issue and don't post big code text here, try add a require statement of github.com/kataras/iris v11.2.2 in your go.mod file and then go build.
shanyujie
@shanyujie
@kataras thanks for you work. I clean the cache and it works properly. Good job.
Gerasimos (Makis) Maropoulos
@kataras
Thanks for your nice words @shanyujie, of course, you are welcome anytime!
kastmgnru
@kastmgnru
@kataras Thanks for updating the framework!
Could you add more examples for the new web socket? In particular, I now don’t understand how I can send a message to all clients or only one by its identifier.
Old code example: https://pastebin.com/C2WuUgpk
shanyujie
@shanyujie
image.png
@kataras
Gerasimos (Makis) Maropoulos
@kataras
@shanyujie I don't know what it's, it seems like a goproxy issue and not a github one

@kastmgnru we have ton of examples at: https://github.com/kataras/iris/tree/master/_examples/websocket , https://github.com/kataras/neffos/tree/master/_examples and https://github.com/kataras/neffos.js/tree/master/_examples. And also the wiki page of Broadcast: https://github.com/kataras/neffos/wiki/Broadcast.

To send to all clients:

server.Broadcast(nil, neffos.Message{Namespace: "...", Event: "...", Body: yourMessage})

To send to all clients except one ID:

server.Broadcast(conn, neffos.Message{Namespace: "...", Event: "...", Body: yourMessage})

OR

server.Broadcast(neffos.Except("connID"), neffos.Message{Namespace: "...", Event: "...", Body: yourMessage})

To send to a specific one, set the To field of the Message:

server.Broadcast(conn, neffos.Message{To: "connectionID", Namespace: "...", Event: "...", Body: yourMessage})

OR, if you have access to the connection value:

conn.Emit("event", yourMessage)
Yuxin Zhao
@YuxinZhaozyx
Hello, Is there any example for building microservices with Iris Web Framework?
Gerasimos (Makis) Maropoulos
@kataras
Hello @YuxinZhaozyx, yes take a look at: https://github.com/kataras/iris/wiki/Starter-kits
godsendMorgen
@tonyjia87
Is there a development tool like Laravel's homestead provides a wonderful and standard development environment ?
Gerasimos (Makis) Maropoulos
@kataras
@tonyjia87 you don't need tools like that with Go at all
Rick
@L-Angel
why i when use iris as server side app.the response time so long...
most of time is used to established tcp connection.
@kataras
Gerasimos (Makis) Maropoulos
@kataras
We are sure that the problem you are facing is not caused by Iris itself but how you use it or what other libraries you are using (i.e for database connection and e.t.c.). Please share a code snippet that we can actually see your point and benchmark it @L-Angel
WoW-Hacker
@Wow-Hackers
加州
RebootCode
@rebootcode
Any answer on this - kataras/neffos#15 ?
Any performance difference between the old websocket and neffos?
is there any performance benchmark for neffos?
RebootCode
@rebootcode
Fei Song
@songfei
hello, in mod file , iris version is : github.com/kataras/iris v11.1.1+incompatible
can not find v11.2.8 , can help me?
Taimoor Badar
@taimoor01_gitlab
Hello , I am getting this error and tried many things but could not solve it. the project is in Laravel and i am quite new at laravel. please help. I am getting this message in my console.
Access to XMLHttpRequest at 'http://sockjs-ap1.pusher.com/pusher/app/appkey/231/6llt85km/xhr?protocol=7&client=js&version=4.4.0&t=1570290622966&n=22' from origin 'http://www.domain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
any help please
Gerasimos (Makis) Maropoulos
@kataras
@/all Please do vote at: kataras/iris#1370.
@taimoor01_gitlab Please fill an issue at: https://github.com/kataras/iris/issues/new/ and post your backend code. You probably missuse the CORS middleware
@rebootcode Thanks mate!
@songfei Please read the updated https://github.com/kataras/iris/wiki/Installation#install and vote in my first link posted a while ago.
vgocoder
@vgocoder
hello,how can I get the http response content ,and log to file
    app := iris.New()

    r, close := newRequestLogger()
    defer close()

    app.Use(r)

    app.OnAnyErrorCode(r, func(ctx iris.Context) {
        ctx.Values().Set("error_log", "error")
        ctx.JSON(http.ApiFailedResponse(ctx.GetStatusCode(), "error", nil))
    })
vgocoder
@vgocoder
@kataras I use toml file at last . ^V^
@kataras I'm back haha
Fei Song
@songfei
@kataras thank you!!
Gerasimos (Makis) Maropoulos
@kataras
Hello @vgocoder welcome once again! You can get it by ctx.GetBody() and run with iris.Run(..., iris.WithoutBodyConsumptionOnUnmarshal) if you want to re-use the response body later on in the same request-response lifecycle (handler chain). GetBody: doc and GetBody: example.
Gilad Sharaby
@giladsh1
Hello
I was wondering if there's a way to set the log level for requests via an environment variable or some other type of configuration.
with the default setting, every GET request is automatically written to stdout, which slows the application down and create a lot of unnecessary noise.
many thanks!
Gerasimos (Makis) Maropoulos
@kataras

Hello @giladsh1,

This is happening because you initialized the Iris application with app := iris.Default(), which registers the request logger middleware and recover, use app := iris.New() instead and customize the request logger (if you need to log the requests) as you want. You can change the log output and customize each log message through logger's Handle method.

Resources:

Gilad Sharaby
@giladsh1
Thanks a lot @kataras!
vgocoder
@vgocoder
@kataras Ths
Phongthorn Khamkankaew
@ALTELMA
Anyone here
Hello
I got this error from a new version of iris v12
Error scanning github.com/kataras/iris/12: cannot find package "." in:
/root/.glide/cache/src/https-github.com-kataras-iris/12
[ERROR] Error scanning github.com/kataras/iris/v12/mvc: cannot find package "." in:
/root/.glide/cache/src/https-github.com-kataras-iris/v12/mvc
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports
FYI, I use glide to get the package.