Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Mastering Google App Engine

You're reading from   Mastering Google App Engine Build robust and highly scalable web applications with Google App Engine

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781784396671
Length 368 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

The dispatch.yaml file


So, we now know how to factor an application into modules and how to access each module. But what if we want certain URL paths to be handled by certain modules instead of relying on the host name / path scheme?

We can do this. The trick is a file called the dispatch.yaml file that contains the URL patterns and the modules that are supposed to handle them. This is what it looks like:

dispatch:    
    - url: "*/api*"
      module: api
    - url: "*/backend*"
      module: backend

This file basically contains two path entries that map to two different modules. The first one is */api*, which means anything containing api in it should be handled by the api module. The second one means that anything starting with backend should be handled by the backend module.

Note

These are unfortunately not regular expressions. These are globing characters. Also note that the patterns are in quote due to the yaml syntax. Each such path entry is limited to only 100 characters and dispatch...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images