Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

392
Views
How to define CLI args before running the app in Launch.json ? (Node.js)

I am trying to specify argument for running the node app. Somehow ,

    role_id=123 secret_id=123 node app

Works. But,

    node app role_id=123 secret_id=123

Doesn't work and gives me missing args error.

When I add these args to launch.json in VsCode , the program runs in the later way , as shown in VSCode Terminal Screenshot. How to run the program in the way , that the args are defined before running node app.

Launch.json looks like this :

{
    "version": "0.2.0",
    "configurations": [
        {
            "args": ["role_id=123", "secret_id=123", "NODE_ENV=test"],
            "type": "node",
            "request": "launch",
            "name": "DEBUG NODE APP",
            "program": "${workspaceFolder}/app.js",
        }
    ]
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!