From 9d529b2b16e872b627445102d9bd217398bbd4fb Mon Sep 17 00:00:00 2001 From: Taranveer Virk Date: Tue, 27 Feb 2018 02:24:52 -0500 Subject: [PATCH] fixup! apply feedback --- pages/en/lb4/Booting-an-Application.md | 18 +++++++++--------- pages/en/lb4/Concepts.md | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pages/en/lb4/Booting-an-Application.md b/pages/en/lb4/Booting-an-Application.md index 237302a26..6a1d4aa33 100644 --- a/pages/en/lb4/Booting-an-Application.md +++ b/pages/en/lb4/Booting-an-Application.md @@ -45,10 +45,10 @@ convenience methods such as `app.boot()` and `app.booters()`. The Mixin also all Components to set the property `booters` as an Array of `Booters`. They will be bound to the Application and called by the `Bootstrapper`. -Since this is a convention based Bootstrapper, it is important to set a `projectRoot`, +Since this is a convention-based Bootstrapper, it is important to set a `projectRoot`, as all other artifact paths will be resolved relative to this path. -_Tip_: `application.ts` will likely be at the root of your project, so it's path can be +_Tip_: `application.ts` will likely be at the root of your project, so its path can be used to set the `projectRoot` by using the `__dirname` variable. _(See example below)_ #### Using the BootMixin @@ -72,7 +72,7 @@ class MyApplication extends BootMixin(Application) { ### app.boot() A convenience method to retrieve the `Bootstrapper` instance bound to the -Application and calls it's `boot` function. This should be called before an +Application and calls its `boot` function. This should be called before an Application's `start()` method is called. _This is an `async` function and should be called with `await`._ @@ -89,8 +89,8 @@ async main() { ### app.booters() -A convenience method manually bind `Booters`. You can pass any number of `Booter` -classes to this method and they will all get bounded to the Application using the +A convenience method to manually bind `Booters`. You can pass any number of `Booter` +classes to this method and they will all be bound to the Application using the prefix (`booters.`) and tag (`booter`) used by the `Bootstrapper`. ```ts @@ -116,8 +116,8 @@ app.component(BootComponent); ## Bootstrapper -A Class that acts as the "manager" for Booters. The Boostrapper is designed to be -bounded to an Application as a `SINGLETON`. The Bootstrapper class provides a `boot()` +A Class that acts as the "manager" for Booters. The Bootstrapper is designed to be +bound to an Application as a `SINGLETON`. The Bootstrapper class provides a `boot()` method. This method is responsible for getting all bound `Booters` and running their `phases`. A `phase` is a method on a `Booter` class. @@ -126,11 +126,11 @@ as its parent. This is done so each `Context` for `boot` gets a new instance of `booters` but the same context can be passed into `boot` so selective `phases` can be run in different calls of `boot`. -The boostrapper can be configured to run only certain booters or phases of booters +The Bootstrapper can be configured to run specific booters or boot phases by passing in `BootExecOptions`. **This is experimental and subject to change. Hence, this functionality is not exposed when calling `boot()` via `BootMixin`**. -To use `BootExecOptions` you must directly call `bootstrapper.boot()` instead of `app.boot()`. +To use `BootExecOptions`, you must directly call `bootstrapper.boot()` instead of `app.boot()`. You can pass in the `BootExecOptions` object with the following properties: | Property | Type | Description | diff --git a/pages/en/lb4/Concepts.md b/pages/en/lb4/Concepts.md index ba6208236..935ea23ee 100644 --- a/pages/en/lb4/Concepts.md +++ b/pages/en/lb4/Concepts.md @@ -18,7 +18,7 @@ LoopBack 4 introduces some new concepts that are important to understand: * [**Server**](Server.html): Represents implementation for inbound transports and/or protocols such as REST over http, gRPC over http2, and graphQL over https. It typically listens for requests on a specific port, handle them, and return appropriate responses. * [**Context**](Context.html): An abstraction of all state and dependencies in your application, that LoopBack uses to “manage” everything. It's a global registry for everything in your app (configurations, state, dependencies, classes, and so on). * [**Dependency Injection**](Dependency-injection.html): Technique that separates the construction of dependencies of a class or function from its behavior, to keep the code loosely coupled. -* [**Booting an Application**](Booting-an-Application.html): A convention based +* [**Booting an Application**](Booting-an-Application.html): A convention-based bootstrapper that can find and bind artifacts such as Controllers, Repositories, etc. * [**Controller**](Controllers.html): Class that implements operations defined by application’s REST API. It implements an application’s business logic and acts as a bridge between the HTTP/REST API and domain/database models. A Controller operates only on processed input and abstractions of backend services / databases. * [**Route**](Routes.html): Mapping between your API specification and an Operation (JavaScript implementation). It tells LoopBack which function to invoke() given an HTTP request.