Skip to content

Commit 99ba74f

Browse files
authored
Merge pull request #12 from platformsh/readme-fix
Correct README method naming.
2 parents 96f55bd + c6baa18 commit 99ba74f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ This method looks for the "foo" variable. If found, it is returned. If not, th
169169
[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.
170170
171171
```js
172-
config.route("main");
172+
config.getRoute("main");
173173
```
174174
175-
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.
175+
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.
176176
177177
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.
178178

0 commit comments

Comments
 (0)