Skip to content
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

Automatic configuration of Models in Application #816

Closed
3 tasks
kjdelisle opened this issue Dec 21, 2017 · 1 comment
Closed
3 tasks

Automatic configuration of Models in Application #816

kjdelisle opened this issue Dec 21, 2017 · 1 comment
Labels

Comments

@kjdelisle
Copy link
Contributor

kjdelisle commented Dec 21, 2017

Story

As a LoopBack 4 developer, I'd like my models to automatically be loaded into my application on boot, so that I don't have to write tons of bind calls myself.

Acceptance Criteria

  • On application boot
    • Read src/models by default (configurable)
    • Parse the JS (TS) files as models and bind them to the app-level context
    • Parse the JSON/YAML files as metadata and call the underlying model / property decorator functions to associate that metadata with the corresponding JS/TS model files
      Ex.
const modelClass = loadModel(modelPath);
const metadataObject = loadMetadata(metaPath);
// @model is just model
model(metadataObject)(modelClass);
  • Docs on loopback.io
  • Blog post about the new functionality

Other Details

@kjdelisle kjdelisle added Boot MVP and removed MVP labels Dec 21, 2017
@dhmlau dhmlau added the DP3 label Apr 10, 2018
@bajtos bajtos added non-DP3 and removed DP3 labels May 15, 2018
@bajtos
Copy link
Member

bajtos commented Jul 30, 2018

Closing as a duplicate of #1428

@bajtos bajtos closed this as completed Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants