Skip to content

Comments

Add multi routing support.#130

Open
monocoder wants to merge 1 commit intoguzba:masterfrom
monocoder:patch-1
Open

Add multi routing support.#130
monocoder wants to merge 1 commit intoguzba:masterfrom
monocoder:patch-1

Conversation

@monocoder
Copy link

Used for specific path prefixes associated with multiple routes. ## For example:

var mainRouter:

...

A sub router can be defined in other files or in the current file. ## There are two sub routes here, users and products, defined in other files.

mainRouter.addRoutesWithPrefix(users, "/api/users") ## mainRouter.addRoutesWithPrefix(products, "/api/products") ## let server = newServer(mainRouter)

server.serve(Port(8080))

## Used for specific path prefixes associated with multiple routes.
## For example:
## var mainRouter:
## ...
## A sub router can be defined in other files or in the current file.
## There are two sub routes here, users and products, defined in other files.
## 
## mainRouter.addRoutesWithPrefix(users, "/api/users")
## mainRouter.addRoutesWithPrefix(products, "/api/products")
## let server = newServer(mainRouter)
## server.serve(Port(8080))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant