MCPcopy Create free account
hub / github.com/kataras/iris / main

Function main

_examples/routing/basic/main.go:163–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

161}
162
163func main() {
164 app := newApp()
165
166 // http://localhost:8080
167 // http://localhost:8080/home
168 // http://localhost:8080/api/users/42
169 // http://localhost:8080/admin
170 // http://localhost:8080/admin/login
171 //
172 // http://localhost:8080/api/users/0
173 // http://localhost:8080/api/users/blabla
174 // http://localhost:8080/wontfound
175 //
176 // http://localhost:8080/u/abcd
177 // http://localhost:8080/u/42
178 // http://localhost:8080/u/-1
179 // http://localhost:8080/u/abcd123
180 // http://localhost:8080/u/some/path/here
181 //
182 // if hosts edited:
183 // http://v1.localhost:8080
184 // http://v1.localhost:8080/api/users
185 // http://v1.localhost:8080/api/users/42
186 // http://anything.localhost:8080
187 app.Listen(":8080")
188}
189
190func adminMiddleware(ctx iris.Context) {
191 // [...]

Callers

nothing calls this directly

Calls 2

newAppFunction · 0.70
ListenMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…