From c6baa182e1745a7bbc5152786073240224080c15 Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Tue, 24 Sep 2019 16:11:01 -0500 Subject: [PATCH] Correct README method naming. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fc4da53..aaa6cf0 100644 --- a/README.md +++ b/README.md @@ -169,10 +169,10 @@ This method looks for the "foo" variable. If found, it is returned. If not, th [Routes](https://docs.platform.sh/configuration/routes.html) on Platform.sh define how a project will handle incoming requests; that primarily means what application container will serve the request, but it also includes cache configuration, TLS settings, etc. Routes may also have an optional ID, which is the preferred way to access them. ```js -config.route("main"); +config.getRoute("main"); ``` -The `route()` method takes a single string for the route ID ("main" in this case) and returns the corresponding route object. If the route is not found it will throw an exception. +The `getRoute()` method takes a single string for the route ID ("main" in this case) and returns the corresponding route object. If the route is not found it will throw an exception. To access all routes, or to search for a route that has no ID, the `routes()` method returns a list of all route objects keyed by their URL. That mirrors the structure of the `PLATFORM_ROUTES` environment variable.