From 01ee587e5863efcd49abc8ec98f6307282fb18dc Mon Sep 17 00:00:00 2001 From: dhmlau Date: Tue, 10 Oct 2023 10:25:07 -0400 Subject: [PATCH] Deploying from loopback-blog Signed-off-by: dhmlau --- blog/.nojekyll | 0 blog/2020-Jun-slack-qa.html | 10 +++++----- blog/2020-april-slack-qa.html | 10 +++++----- blog/2020-community-contribution.html | 10 +++++----- blog/2020-goals.html | 10 +++++----- blog/2020-hacktoberfest.html | 10 +++++----- ...20-improve-looopback-performance-uuid.html | 10 +++++----- blog/2020-jul-slack-qa.html | 10 +++++----- blog/2020-lb3-eol.html | 10 +++++----- blog/2020-may-slack-qa.html | 10 +++++----- blog/2020-oct-slack-qa.html | 10 +++++----- blog/2020-sept-slack-qa.html | 10 +++++----- blog/2020-share-repository-code.html | 10 +++++----- blog/404.html | 8 ++++---- blog/april-2019-milestone.html | 10 +++++----- blog/april-2020-milestone.html | 10 +++++----- blog/archive.html | 10 +++++----- .../bday-0ff7a81f833c0ae2f86583db8b7d6a95.jpg | Bin 0 -> 1102102 bytes ...58f65.25e16398.js => 06958f65.5b0ac99a.js} | 2 +- ...3aae5.a06c9fd1.js => 08d3aae5.20a13097.js} | 2 +- blog/assets/js/10704ce3.36d76c7b.js | 1 + blog/assets/js/10704ce3.9e3ef0f6.js | 1 - ...e4159.b9554e7f.js => 11ce4159.ff08b5d9.js} | 2 +- ...63d42.72e6aa6d.js => 15463d42.fedf0dea.js} | 2 +- blog/assets/js/1633944b.2ba0dbf3.js | 1 + ...6b20e.a7b46be3.js => 1f66b20e.95f2369b.js} | 2 +- blog/assets/js/20995ba1.02f38bb7.js | 1 + blog/assets/js/2813d4f9.12827393.js | 1 - blog/assets/js/2813d4f9.199a3704.js | 1 + ...b3780.f4b80192.js => 3d8b3780.03c77e95.js} | 2 +- ...76adc.2ac50af9.js => 44176adc.72d6a3d9.js} | 2 +- ...ed8e6.31e995bc.js => 446ed8e6.266fc975.js} | 2 +- ...c4dbb.2f05c486.js => 44ac4dbb.0138e0aa.js} | 2 +- blog/assets/js/52099127.93e684de.js | 1 + blog/assets/js/52099127.fbbf288b.js | 1 - ...a15d2.be4b82a5.js => 5a1a15d2.8c2f799f.js} | 2 +- blog/assets/js/65b6c43c.1d9e9325.js | 1 - ...029be.6290fd73.js => 6f1029be.b55bd981.js} | 2 +- ...726a8.f7031fda.js => 7d9726a8.f2695892.js} | 2 +- blog/assets/js/814f3328.5da20f7c.js | 1 - blog/assets/js/814f3328.93f01dea.js | 1 + ...1c9df.343b5d58.js => 8751c9df.7653d757.js} | 2 +- ...4e46b.c3e20268.js => 8eb4e46b.8d218c5b.js} | 2 +- ...99a1c.6fba7c97.js => 92999a1c.32ad2845.js} | 2 +- blog/assets/js/98b657d8.39d6add9.js | 1 + blog/assets/js/9ee50ff8.4c91d59b.js | 1 + ...23ddc.572d1c7c.js => a7023ddc.12a6cee4.js} | 2 +- ...f882f.4d4667a7.js => b0ef882f.be589179.js} | 2 +- blog/assets/js/b2f554cd.5e39e982.js | 1 + blog/assets/js/b2f554cd.cc2449ee.js | 1 - blog/assets/js/bfd38841.7e2ba077.js | 1 + blog/assets/js/bfd38841.a4694718.js | 1 - ...fd7f7.f3418c4a.js => c1dfd7f7.39216d45.js} | 2 +- ...a514d.4cbf28e6.js => d19a514d.3cbbe1bb.js} | 2 +- blog/assets/js/e19a6acf.16b69082.js | 1 - blog/assets/js/e19a6acf.ae09304c.js | 1 + ...224ce.d7a382c7.js => e62224ce.f6da1d15.js} | 2 +- ...7448b.8268ba68.js => e647448b.f9758a24.js} | 2 +- ...2e53c.f33992ce.js => eb62e53c.38af6914.js} | 2 +- ...d19c8.64ba5667.js => f7fd19c8.f0e73057.js} | 2 +- ...dbb14.f8731eff.js => fcadbb14.2d6f192f.js} | 2 +- blog/assets/js/main.5ff5f950.js | 2 ++ ...CENSE.txt => main.5ff5f950.js.LICENSE.txt} | 0 blog/assets/js/main.f856f5e5.js | 2 -- blog/assets/js/runtime~main.83161d21.js | 1 - blog/assets/js/runtime~main.983191c7.js | 1 + blog/atom.xml | 15 ++++++++++++++- blog/august-2019-milestone.html | 10 +++++----- blog/august-2020-milestone.html | 10 +++++----- ...ng-an-online-game-with-loopback-4-pt2.html | 10 +++++----- ...ng-an-online-game-with-loopback-4-pt3.html | 10 +++++----- ...ng-an-online-game-with-loopback-4-pt4.html | 10 +++++----- ...ng-an-online-game-with-loopback-4-pt5.html | 10 +++++----- ...ng-an-online-game-with-loopback-4-pt6.html | 10 +++++----- ...ng-an-online-game-with-loopback-4-pt7.html | 10 +++++----- ...lding-online-game-with-loopback-4-pt1.html | 10 +++++----- blog/cascon-evoke-2019.html | 10 +++++----- ...c-end-to-end-REST-APIs-with-loopback4.html | 10 +++++----- blog/december-2018-milestone.html | 10 +++++----- blog/december-2019-milestone.html | 10 +++++----- blog/express-to-loopback.html | 10 +++++----- blog/february-2019-milestone.html | 10 +++++----- blog/february-2020-milestone.html | 10 +++++----- blog/going-cloud-native-with-loopback-4.html | 10 +++++----- blog/happy-5th-bday.html | 18 ++++++++++++++++++ ...mport-loopback-3-models-to-loopback-4.html | 10 +++++----- blog/inclusion-of-related-models.html | 10 +++++----- blog/index.html | 12 ++++++------ blog/january-2019-milestone.html | 10 +++++----- blog/january-2020-milestone.html | 10 +++++----- blog/july-2019-milestone.html | 10 +++++----- blog/july-2020-milestone.html | 10 +++++----- blog/june-2020-milestone.html | 10 +++++----- blog/lb3-entered-maintenance-mode.html | 10 +++++----- blog/lb3-extended-lts.html | 10 +++++----- ...oopback-2019-api-award-api-middleware.html | 10 +++++----- blog/loopback-2019-review.html | 10 +++++----- blog/loopback-4-2019-q1-overview.html | 10 +++++----- blog/loopback-4-2019-q2-overview.html | 10 +++++----- blog/loopback-4-2019-q3-overview.html | 10 +++++----- blog/loopback-4-2020-q1-overview.html | 10 +++++----- blog/loopback-4-2020-q2-overview.html | 10 +++++----- blog/loopback-4-2020-q3-overview.html | 10 +++++----- blog/loopback-4-authentication-updates.html | 10 +++++----- blog/loopback-june-2019-milestone.html | 10 +++++----- blog/loopback4-2019-q4-overview.html | 10 +++++----- blog/loopback4-interceptors-part1.html | 10 +++++----- blog/loopback4-interceptors-part2.html | 10 +++++----- blog/loopback4-javascript-experience.html | 10 +++++----- blog/march-2019-milestone.html | 10 +++++----- blog/march-2020-milestone.html | 10 +++++----- blog/may-2019-milestone.html | 10 +++++----- blog/may-2020-milestone.html | 10 +++++----- ...tup-quickly-build-apis-using-loopback.html | 10 +++++----- ...migrate-from-loopback-3-to-loopback-4.html | 10 +++++----- blog/model-to-rest-api-feature.html | 10 +++++----- blog/new-home-for-the-loopback-blog.html | 12 ++++++------ blog/november-2019-milestone.html | 10 +++++----- blog/november-2020-milestone.html | 10 +++++----- blog/october-2019-milestone.html | 10 +++++----- blog/october-2020-milestone.html | 10 +++++----- blog/page/2.html | 10 +++++----- blog/page/3.html | 12 ++++++------ blog/page/4.html | 10 +++++----- blog/page/5.html | 10 +++++----- blog/page/6.html | 10 +++++----- blog/page/7.html | 10 +++++----- blog/page/8.html | 18 ++++++++++++++++++ blog/rss.xml | 11 ++++++++++- blog/september-2019-milestone.html | 10 +++++----- blog/september-2020-milestone.html | 10 +++++----- blog/sitemap.xml | 2 +- blog/switching-to-dco.html | 10 +++++----- blog/tags.html | 10 +++++----- blog/tags/authentication.html | 10 +++++----- blog/tags/casco-nx-evoke.html | 10 +++++----- blog/tags/cloud-native.html | 10 +++++----- blog/tags/community.html | 10 +++++----- blog/tags/community/page/2.html | 10 +++++----- blog/tags/conference.html | 10 +++++----- blog/tags/contribution.html | 10 +++++----- blog/tags/event.html | 10 +++++----- blog/tags/experiment.html | 10 +++++----- blog/tags/express.html | 10 +++++----- blog/tags/feature.html | 10 +++++----- blog/tags/hacktoberfest.html | 10 +++++----- blog/tags/how-to.html | 10 +++++----- blog/tags/interceptor.html | 10 +++++----- blog/tags/java-script.html | 10 +++++----- blog/tags/javascript.html | 10 +++++----- blog/tags/learning.html | 10 +++++----- blog/tags/loop-back-3.html | 10 +++++----- blog/tags/meta.html | 12 ++++++------ blog/tags/migration.html | 10 +++++----- blog/tags/milestone-update.html | 10 +++++----- blog/tags/milestone-update/page/2.html | 10 +++++----- blog/tags/milestone-update/page/3.html | 10 +++++----- blog/tags/news.html | 10 +++++----- blog/tags/performance.html | 10 +++++----- blog/tags/q-a.html | 10 +++++----- blog/tags/quarterly-update.html | 10 +++++----- blog/tags/related-models.html | 10 +++++----- blog/tags/repository.html | 10 +++++----- blog/tags/rest.html | 10 +++++----- blog/tags/slack.html | 10 +++++----- ...etup-quickly-build-apis-with-loopback.html | 10 +++++----- 166 files changed, 657 insertions(+), 596 deletions(-) create mode 100644 blog/.nojekyll create mode 100644 blog/assets/images/bday-0ff7a81f833c0ae2f86583db8b7d6a95.jpg rename blog/assets/js/{06958f65.25e16398.js => 06958f65.5b0ac99a.js} (99%) rename blog/assets/js/{08d3aae5.a06c9fd1.js => 08d3aae5.20a13097.js} (97%) create mode 100644 blog/assets/js/10704ce3.36d76c7b.js delete mode 100644 blog/assets/js/10704ce3.9e3ef0f6.js rename blog/assets/js/{11ce4159.b9554e7f.js => 11ce4159.ff08b5d9.js} (79%) rename blog/assets/js/{15463d42.72e6aa6d.js => 15463d42.fedf0dea.js} (99%) create mode 100644 blog/assets/js/1633944b.2ba0dbf3.js rename blog/assets/js/{1f66b20e.a7b46be3.js => 1f66b20e.95f2369b.js} (71%) create mode 100644 blog/assets/js/20995ba1.02f38bb7.js delete mode 100644 blog/assets/js/2813d4f9.12827393.js create mode 100644 blog/assets/js/2813d4f9.199a3704.js rename blog/assets/js/{3d8b3780.f4b80192.js => 3d8b3780.03c77e95.js} (93%) rename blog/assets/js/{44176adc.2ac50af9.js => 44176adc.72d6a3d9.js} (54%) rename blog/assets/js/{446ed8e6.31e995bc.js => 446ed8e6.266fc975.js} (98%) rename blog/assets/js/{44ac4dbb.2f05c486.js => 44ac4dbb.0138e0aa.js} (79%) create mode 100644 blog/assets/js/52099127.93e684de.js delete mode 100644 blog/assets/js/52099127.fbbf288b.js rename blog/assets/js/{5a1a15d2.be4b82a5.js => 5a1a15d2.8c2f799f.js} (98%) delete mode 100644 blog/assets/js/65b6c43c.1d9e9325.js rename blog/assets/js/{6f1029be.6290fd73.js => 6f1029be.b55bd981.js} (98%) rename blog/assets/js/{7d9726a8.f7031fda.js => 7d9726a8.f2695892.js} (79%) delete mode 100644 blog/assets/js/814f3328.5da20f7c.js create mode 100644 blog/assets/js/814f3328.93f01dea.js rename blog/assets/js/{8751c9df.343b5d58.js => 8751c9df.7653d757.js} (53%) rename blog/assets/js/{8eb4e46b.c3e20268.js => 8eb4e46b.8d218c5b.js} (58%) rename blog/assets/js/{92999a1c.6fba7c97.js => 92999a1c.32ad2845.js} (79%) create mode 100644 blog/assets/js/98b657d8.39d6add9.js create mode 100644 blog/assets/js/9ee50ff8.4c91d59b.js rename blog/assets/js/{a7023ddc.572d1c7c.js => a7023ddc.12a6cee4.js} (96%) rename blog/assets/js/{b0ef882f.4d4667a7.js => b0ef882f.be589179.js} (75%) create mode 100644 blog/assets/js/b2f554cd.5e39e982.js delete mode 100644 blog/assets/js/b2f554cd.cc2449ee.js create mode 100644 blog/assets/js/bfd38841.7e2ba077.js delete mode 100644 blog/assets/js/bfd38841.a4694718.js rename blog/assets/js/{c1dfd7f7.f3418c4a.js => c1dfd7f7.39216d45.js} (60%) rename blog/assets/js/{d19a514d.4cbf28e6.js => d19a514d.3cbbe1bb.js} (89%) delete mode 100644 blog/assets/js/e19a6acf.16b69082.js create mode 100644 blog/assets/js/e19a6acf.ae09304c.js rename blog/assets/js/{e62224ce.d7a382c7.js => e62224ce.f6da1d15.js} (98%) rename blog/assets/js/{e647448b.8268ba68.js => e647448b.f9758a24.js} (68%) rename blog/assets/js/{eb62e53c.f33992ce.js => eb62e53c.38af6914.js} (97%) rename blog/assets/js/{f7fd19c8.64ba5667.js => f7fd19c8.f0e73057.js} (74%) rename blog/assets/js/{fcadbb14.f8731eff.js => fcadbb14.2d6f192f.js} (85%) create mode 100644 blog/assets/js/main.5ff5f950.js rename blog/assets/js/{main.f856f5e5.js.LICENSE.txt => main.5ff5f950.js.LICENSE.txt} (100%) delete mode 100644 blog/assets/js/main.f856f5e5.js delete mode 100644 blog/assets/js/runtime~main.83161d21.js create mode 100644 blog/assets/js/runtime~main.983191c7.js create mode 100644 blog/happy-5th-bday.html create mode 100644 blog/page/8.html diff --git a/blog/.nojekyll b/blog/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/blog/2020-Jun-slack-qa.html b/blog/2020-Jun-slack-qa.html index 5157f4065..0b865f0c2 100644 --- a/blog/2020-Jun-slack-qa.html +++ b/blog/2020-Jun-slack-qa.html @@ -5,14 +5,14 @@ Community Q&A Monthly Digest - Jun 2020 | LoopBack - - + +
-
Skip to main content

Community Q&A Monthly Digest - Jun 2020

· 3 min read
Diana Lau

Originally published on strongloop.com

Welcome back to the "Community Q&A Monthly Digest", in which we highlight some of the questions and answers in our LoopBack Slack community here.

Question: Has anyone implemented Casbin on a brand new project? or is there a good tutorial for lb4? I need to have some rbac / roles system in an app.. or what would you suggest to achieve that?

Answer: We have an access control example uses casbin, see the access-control-migration example and its tutorial. The logic on casbin side is only a prototype, the example mainly shows the integration between casbin and LoopBack authorization system.


Question: I am new to LoopBack and so far I really like what it has to offer. I was wondering if anyone knows of a good online course to learn LoopBack. I have worked through the basic tutorials found in the documentation, but I find it easier to listen and follow along to videos.

Answer: Recently one of our community member posts a YouTube tutorial for LoopBack 4 beginners. There is another series of educational videos on a LoopBack introduction and installation.

From our side, there are a few recent videos on our StrongLoop YouTube channel and we're trying to add more. Hope it helps.


Question: I am trying to disable the openapi.json from showing in my loopback 4 application and its not working. I was able to disable the explorer. Any ideas?

Answer: You can use openApiSpec: {disabled: true} in index.ts. i.e.

const config = {
rest: {
//..
openApiSpec: {
disabled: true
//..
},
},
};

Question: Does Loopback 4 support extracting cookies from the header? Currently I had to integrate Express server to achieve this.

Answer: You can use express middleware like http://expressjs.com/en/resources/middleware/cookie-parser.html see how to use middleware in https://loopback.io/doc/en/lb4/Express-middleware.html.


Question: Is there a quick way to generate timestamp? Like at the model level generated:true?

Answer: I recommend to use defaultFn set to one of the following string values:

  • "guid": generate a new globally unique identifier (GUID) using the computer MAC address and current time (UUID version 1).
  • "uuid": generate a new universally unique identifier (UUID) using the computer MAC address and current time (UUID version 1).
  • "uuidv4": generate a new universally unique identifier using the UUID version 4 algorithm.
  • "now": use the current date and time as returned by new Date()

See also https://github.com/strongloop/loopback/issues/292 and https://loopback.io/doc/en/lb4/Model.html#property-decorator.

It would be great to capture these options in our TypeScript definitions, see https://github.com/strongloop/loopback-next/blob/ae6427322451c914ae54f44dbb656981e7fbbb81/packages/repository/src/model.ts#L34-L42.


Question: Can I use MongoDB update operators in LoopBack apps? How can I enable it?

Answer: Yes, except comparison and logical operators, the mongo connector also supports MongoDB update operators such as max, rename, etc. You will need to set the flag allowExtendedOperators to true in the datasource configuration. You can find details and examples at MongoDB connector - update operators.


Interested to Join our Slack Workspace?

Simply click this invitation link to join. You can also find more channel details here: https://github.com/strongloop/loopback-next/issues/5048.