refactor: separate web host from workflow application - #25
Conversation
Includes branch changelog.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f30b46905d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1,2 +1,6 @@ | |||
| export * from 'bpmn-server'; | |||
| export {configuration} from './WorkflowApp/configuration.js'; | |||
| export { WebApp } from './app.js'; | |||
There was a problem hiding this comment.
Import the relocated configuration in setup
Removing configuration from this barrel leaves src/scripts/setup.ts:66-75 loading pack.configuration from ../index.js; whenever setup reaches install() (for example, the second setup run after .env has been created), pack.configuration is undefined and accessing .database throws before any datastore installation occurs. Update the setup script to import the sample application's configuration directly.
Useful? React with 👍 / 👎.
| constructor(application: WorkflowApplication) { | ||
| this.application = application; |
There was a problem hiding this comment.
Make the user store an application-owned dependency
For an embedded application whose engine configuration uses a custom datastore or supplies MongoDB programmatically without MONGO_DB_URL, constructing the newly public WebApp still unconditionally creates UserManager, which initializes connect-mongo and calls mongoose.connect(process.env.MONGO_DB_URL). Such applications therefore fail during construction or connect authentication to an unrelated database despite supplying all persistence through WorkflowApplication; the user/auth manager needs to be injected or made optional through this boundary.
Useful? React with 👍 / 👎.
Summary
Separates the reusable HTTP integration layer from the sample workflow application.
CHANGELOG.mdStack
This is the independent web #1 proposal.