logo
down
shadow

Erlang:How to load sys.config in console?


Erlang:How to load sys.config in console?

Content Index :

Erlang:How to load sys.config in console?
Tag : intellij-idea , By : user170635
Date : December 01 2020, 04:55 PM


Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

load wcf hosted on console app with app.config?


Tag : chash , By : niel
Date : March 29 2020, 07:55 AM
I wish this helpful for you WCF will by default try to load from the app config.
Here is some more info:

How to convert Erlang sys.config into Elixir config.exs?


Tag : erlang , By : Rit Li
Date : March 29 2020, 07:55 AM
This might help you If you fix the syntax errors (missing commas) and add the mandatory trailing dot, you can even parse the Erlang term from Elixir and let the parser do the conversion for you:
erlang_term = '{gsms, [{interfaces, [
  {gsms_0705, 1, [{device,"/dev/tty.usbserial-FTF5DP2J"},
                  {bnumber, "<phone-number>"},{baud,19200},
                  {reopen_timeout, 5000}]},
  {gsms_0705, 2, [{device,"/dev/tty.HUAWEIMobile-Pcui"},
                  {bnumber, "<phone-number>"},
                  {reopen_timeout, 5000}]},
  {gsms_0705, 3, [{device, "/dev/tty.usbserial"},
                  {bnumber, "<phone-number>"},
                  {baud, 9600}]}
 ]}
]}.'

{:ok, tokens, _} = :erl_scan.string(erlang_term)
{:ok, result} = :erl_parse.parse_term(tokens)
IO.inspect result, limit: :infinity
{:gsms,
 [interfaces: [{:gsms_0705, 1,
    [device: '/dev/tty.usbserial-FTF5DP2J', bnumber: '<phone-number>',
     baud: 19200, reopen_timeout: 5000]},
   {:gsms_0705, 2,
    [device: '/dev/tty.HUAWEIMobile-Pcui', bnumber: '<phone-number>',
     reopen_timeout: 5000]},
   {:gsms_0705, 3,
    [device: '/dev/tty.usbserial', bnumber: '<phone-number>', baud: 9600]}]]}
config :gsms, interfaces: [
  {:gsms_0705, 1, [
    device: '/dev/tty.usbserial-FTF5DP2J',
    bnumber: '<phone-number>',
    baud: 19200,
    reopen_timeout: 5000]},
  {:gsms_0705, 2, [
    device: '/dev/tty.HUAWEIMobile-Pcui',
    bnumber: '<phone-number>',
    reopen_timeout: 5000]},
  {:gsms_0705, 3, [
    device: '/dev/tty.usbserial',
    bnumber: '<phone-number>',
    baud: 9600]}]

C# Console application calling a Web MVC DLL that reads Web.config fails to load Web.config values


Tag : chash , By : vferman
Date : March 29 2020, 07:55 AM
I wish this help you Options you can think of: 1. Have the same settings in your App.config 2. Moving the settings in Web.config to resource file.

How do you load a dictionary into a console application from an app.config?


Tag : chash , By : liquidx
Date : March 29 2020, 07:55 AM

Web.config-style transforms for App.config files for C# Console apps?


Tag : chash , By : Rohii
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
shadow
Privacy Policy - Terms - Contact Us © scrbit.com