aboutsummaryrefslogtreecommitdiff
path: root/server/config/sys.config
blob: 9334132f85517050a6b09321e3c84f7d682e06f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[
  {jchat, [
    {http_port, 80},
    {api_domain, "api.jchat.localhost"},
    {web_domain, "web.jchat.localhost"},
    {static_files_dir, "../client"},
    {cors_origins, ["http://web.jchat.localhost", "https://web.jchat.localhost"]},
    {jwt_secret, "your-secret-key-change-in-production"},
    {database, [
      {backend, mnesia},
      {data_dir, "./data"}
    ]},
    {auth, [
      {bcrypt_rounds, 12},
      {token_expiry_hours, 24},
      {allow_registration, true}
    ]}
  ]},
  {kernel, [
    {logger_level, info},
    {logger, [
      {handler, default, logger_std_h, #{
        config => #{file => "log/jchat.log"},
        formatter => {logger_formatter, #{
          single_line => true,
          template => [time," [",level,"] ",msg,"\n"]
        }}
      }}
    ]}
  ]},
  {mnesia, [
    {dir, "data"}
  ]}
].