Skip to content

Enable Multi-App Run for JavaScript HTTP bindings quickstart#1292

Merged
alicejgibbons merged 8 commits intodapr:release-1.17from
AdepuSriCharan:feature/js-multiapp-bindings
Mar 6, 2026
Merged

Enable Multi-App Run for JavaScript HTTP bindings quickstart#1292
alicejgibbons merged 8 commits intodapr:release-1.17from
AdepuSriCharan:feature/js-multiapp-bindings

Conversation

@AdepuSriCharan
Copy link
Copy Markdown
Contributor

Description

This PR updates the JavaScript HTTP bindings quickstart to use Dapr Multi-App Run as the default execution method.

Previously, users had to manually start the application using a long dapr run command with multiple flags:

dapr run --app-id batch-http --app-port 5002 --resources-path ../../../components -- node index.js

Now the quickstart can be started with a single command:

dapr run -f .

This aligns the JavaScript quickstart with the already merged Java quickstart and significantly improves the onboarding experience and reproducibility for first-time users.


Issue reference

Fixes #962


Changes

Added

bindings/javascript/http/dapr.yaml

Defines:

  • application id
  • working directory
  • application port
  • startup command
  • component resources path

Updated

bindings/javascript/http/README.md

  • Replaced manual dapr run command with dapr run -f .
  • Added prerequisites (Node.js, npm, and dapr init)
  • Updated instructions to use docker compose up -d
  • Added PostgreSQL verification step
  • Clarified execution flow (Cron → Service → PostgreSQL)

Verification

Tested locally.

1. Start database

cd bindings/db
docker compose up -d

2. Install dependencies

cd bindings/javascript/http/batch
npm install

3. Run the quickstart

cd ..
dapr run -f .

Observed

  • Node.js service starts successfully
  • Dapr sidecar initializes
  • Cron binding triggers every 10 seconds
  • Orders are inserted into PostgreSQL

Verified with

docker exec postgres psql -U postgres -d orders -c "SELECT * FROM orders;"

Records increase over time, confirming the full end-to-end flow.


Checklist

  • The quickstart code compiles correctly
  • The quickstart was tested locally
  • README has been updated
  • Validation steps remain compatible with automated execution

Signed-off-by: Adepu Sri Charan <sricharan.adepu36@gmail.com>
@AdepuSriCharan AdepuSriCharan requested review from a team as code owners February 26, 2026 14:18
@AdepuSriCharan AdepuSriCharan changed the base branch from master to release-1.17 February 26, 2026 14:22
@AdepuSriCharan AdepuSriCharan changed the title Feature/js multiapp bindings Enable Multi-App Run for JavaScript HTTP bindings quickstart Feb 26, 2026
<!-- STEP
name: Run batch-http service
working_dir: ./batch
expected_stdout_lines:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

	== APP - batch-http == insert into orders (orderid, customer, price) values (1, 'John Smith', 100.32);
	== APP - batch-http == insert into orders (orderid, customer, price) values (2, 'Jane Bond', 15.4);
	== APP - batch-http == insert into orders (orderid, customer, price) values (3, 'Tony James', 35.56);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix tests @AdepuSriCharan

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!
I’ve updated the expected stdout lines to match the output from dapr run -f . and pushed the fix. The validation now passes locally. Please take another look.

<!-- STEP
name: Run batch-http service
working_dir: ./batch
expected_stdout_lines:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix tests @AdepuSriCharan

AdepuSriCharan and others added 4 commits March 4, 2026 19:30
…ation

Update expected_stdout_lines to use substring matching without the
== APP == prefix and include trailing semicolons to match the actual
output from 'dapr run -f .' multi-app run format.

Signed-off-by: Adepu Sri Charan <sricharan.adepu36@gmail.com>
Resolve conflict in bindings/javascript/http/README.md: keep semicolons
in expected_stdout_lines since the JS code outputs them.

Signed-off-by: Adepu Sri Charan <sricharan.adepu36@gmail.com>
Resolve conflicts in bindings/javascript/http:
- dapr.yaml: use upstream configuration (appPort 5004, node index.js)
- README.md: keep multi-app run documentation and verification section

Signed-off-by: Adepu Sri Charan <sricharan.adepu36@gmail.com>
@alicejgibbons
Copy link
Copy Markdown
Contributor

Thanks @AdepuSriCharan

Copy link
Copy Markdown
Contributor

@alicejgibbons alicejgibbons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@alicejgibbons alicejgibbons merged commit 08a042a into dapr:release-1.17 Mar 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bindings QuickStart - Multi App Run examples

2 participants