-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[CLI] Generate DataSource #1225
Comments
Things to consider:
|
IMO, we should also register the newly created datasource with the application, see e.g. https://github.com/strongloop/loopback-next/blob/c92603157ca7f08cf3748ca6bbd1e68da87d821e/examples/todo/src/application.ts#L48-L56 Simplified version that's probably good enough for DP3: import {db} from './db.datasource.ts';
// ...
app.dataSource(db); Ideally, this registration should provided by
Yes, let's start with the same list. |
related to #441 |
@virkt25 , if it's good for estimate, please move to the |
Description / Feature proposal
CLI command to generate datasource. It generates either:
Sample for the first approach:
Sample for the latter approach:
User Experience
As a result, src/datasources/testds.datasource.ts will be generated.
Outstanding questions
example-todo
?Acceptance Criteria
lb4 datasource
-- works like LB3 CLI with the following changes:.json
file.ts
file is created which injects the datasource configenv
...The text was updated successfully, but these errors were encountered: