aboutsummaryrefslogblamecommitdiff
path: root/shard/config/config.exs
blob: 215a76abe71ca75520399dad1e2dea7bc3e445e4 (plain) (tree)






















                                                                      
 





                                                                                
                
                



                                                                 
 





                                                                   

                
                                                                       
 
 






                                                                         
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the parent project. For this reason,
# if you want to provide default values for your application for
# 3rd-party users, it should be done in your "mix.exs" file.

# You can configure your application as:
#
#     config :shard, key: :value
#
# and access this configuration in your application as:
#
#     Application.get_env(:shard, :key)
#
# You can also configure a 3rd-party app:
#
#     config :logger, level: :info
#


# P2P Port
# ========
# This is the port Shard will listen on for P2P connections.
config :shard, port: elem (Integer.parse ((System.get_env "PORT") || "4044")), 0


# Network secret
# ==============
# The secret value that identifies the shard network this peer
# participates in. Used in the secure handshake protocol.
# Must be 32 bytes long.
config :shard, network_key: :crypto.hash(:sha256, "ShardTestNet")

# Identity suffix
# ===============
# This Shard instance will only accept messages by identities whose
# key ends by this suffix
config :shard, identity_suffix: "ID"

# Data directory
# ==============
config :shard, data_path: Path.join [System.user_home, "shard", "data"]


# It is also possible to import configuration files, relative to this
# directory. For example, you can emulate configuration per environment
# by uncommenting the line below and defining dev.exs, test.exs and such.
# Configuration from the imported file will override the ones defined
# here (which is why it is important to import them last).
#
#     import_config "#{Mix.env}.exs"