Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6681335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:34:43+00:00 2026-05-26T04:34:43+00:00

Is there a way to pass parameters to root supervisor of an application other

  • 0

Is there a way to pass parameters to root supervisor of an application other than with config file and application:get_env/1? For instance, by command line?

I start my app as “erl -pa ebin -run appname”, and then communicate with it by TCP/IP. TCP port on which it listens is set in ebin/appname.app, in env part. Now I’d like to be able to tell my app to forget that and listen on a port which I would give on command line (something like “erl -pa ebin -run appname -env [{port, 1234}]”). Is there a standardised pattern for that?

The problem is that I sometimes decide the app should start on another, non default port, for testing purposes, and changing the .app file every time is just pain in the ass.

Regards,
dijxtra

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:34:43+00:00Added an answer on May 26, 2026 at 4:34 am

    Yes. You can override the value of an environment variable via the command line, using:

    erl -appname key value
    

    And retrieving the parameter using:

    application:get_env(appname, key).
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to pass command line parameters to a Flash projector in
With scikit-learn , is there a way to pass additional parameters to the fit
Is there a way to pass parameters to a resource dictionary? I think that
Is there a way I can pass parameters to the searchStyle function from the
I'm working on an mvc .net web application. Is there a way to pass
Is there a way to pass the parameters to the LoadControl function when loading
Is there a way to pass parameters via the addTarget call as it calls
Is there a way to pass dynamic parameters into a custom jquery validate method?
Is there a way to directly pass parameters to a .pbs script before submitting
As the title implies, is there a way to pass url parameters to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.