-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs: todo-tutorial extend app with ServiceMixin #1703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
virkt25
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Just one minor change needed and this should be good to land.
| ```ts | ||
| import {ServiceMixin} from '@loopback/service-proxy'; | ||
|
|
||
| export class StorageApplication extends BootMixin( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be TodoListApplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed 😄
| | `dirs` | `string \| string[]` | `['services']` | Paths relative to projectRoot to look in for Service artifacts | | ||
| | `extensions` | `string \| string[]` | `['.service.js']` | File extensions to match for Service artifacts | | ||
| | `nested` | `boolean` | `true` | Look in nested directories in `dirs` for Service artifacts | | ||
| | `glob` | `string` | | A `glob` pattern string. This takes precedence over above 3 options (which are used to make a glob pattern). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for cleaning up the mess I left after copy-and-paste 👍
| } | ||
| ``` | ||
|
|
||
| ### Extend application with ServiceMixin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we need this step?
Since #1649, applications scaffolded via lb4 include the ServiceMixin automatically, unless the user chooses to opt-out.
Should we perhaps rephrase this section and explain that it applies only to applications that were initially scaffolded without services?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, great catch!! In light of this I think I would like to not see this section added to the docs since we are trying to ready the docs for GA.
@shazha Can you update this to actually just remove the Installed @loopback/service-proxy section. The latest version of @loopback/cli scaffolds an app correctly and should not require installing / modifying anything else on the part of a user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ServiceMixin is indeed enabled by default. My own application was generated by a earlier version lb4, I should've tested it against the latest cli.
I've removed the newly added section, as well as the Install @loopback/service-proxy section mentioned by @virkt25 .
jannyHou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bajtos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
ServiceMixin is installed by CLI scaffolding. Fix two typos in service booter doc re #1701
|
You PR has landed. Thankyou for the contribution @shazha!! 🎉 💯 |
Document the need for extend the application with ServiceMixin and fix two typos in service booter
doc
re #1701
Checklist
npm testpasses on your machinepackages/cliwere updatedexamples/*were updated