An example AT Protocol application, written in Elixir using atex and Drinkup.
1import Config
2
3# Configure your database
4config :statusphere, Statusphere.Repo,
5 database: Path.expand("../statusphere_dev.db", __DIR__),
6 pool_size: 5,
7 stacktrace: true,
8 show_sensitive_data_on_connection_error: true
9
10# For development, we disable any cache and enable
11# debugging and code reloading.
12#
13# The watchers configuration can be used to run external
14# watchers to your application. For example, we can use it
15# to bundle .js and .css sources.
16config :statusphere, StatusphereWeb.Endpoint,
17 # Binding to loopback ipv4 address prevents access from other machines.
18 # Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
19 http: [ip: {127, 0, 0, 1}],
20 check_origin: false,
21 code_reloader: true,
22 debug_errors: true,
23 secret_key_base: "YjHndGQyYIEkOsJtZzle8dUtbznbvM2CwGhF7NSoWxgSTIGpouNbVIND7cAmnWfB",
24 watchers: [
25 esbuild: {Esbuild, :install_and_run, [:statusphere, ~w(--sourcemap=inline --watch)]},
26 tailwind: {Tailwind, :run, [:statusphere, ~w(--watch)]}
27 ]
28
29# ## SSL Support
30#
31# In order to use HTTPS in development, a self-signed
32# certificate can be generated by running the following
33# Mix task:
34#
35# mix phx.gen.cert
36#
37# Run `mix help phx.gen.cert` for more information.
38#
39# The `http:` config above can be replaced with:
40#
41# https: [
42# port: 4001,
43# cipher_suite: :strong,
44# keyfile: "priv/cert/selfsigned_key.pem",
45# certfile: "priv/cert/selfsigned.pem"
46# ],
47#
48# If desired, both `http:` and `https:` keys can be
49# configured to run both http and https servers on
50# different ports.
51
52# Reload browser tabs when matching files change.
53config :statusphere, StatusphereWeb.Endpoint,
54 live_reload: [
55 web_console_logger: true,
56 patterns: [
57 # Static assets, except user uploads
58 ~r"priv/static/(?!uploads/).*\.(js|css|png|jpeg|jpg|gif|svg)$",
59 # Router, Controllers, LiveViews and LiveComponents
60 ~r"lib/statusphere_web/router\.ex$",
61 ~r"lib/statusphere_web/(controllers|live|components)/.*\.(ex|heex)$"
62 ]
63 ]
64
65# Enable dev routes for dashboard and mailbox
66config :statusphere, dev_routes: true
67
68# Do not include metadata nor timestamps in development logs
69config :logger, :default_formatter, format: "[$level] $message\n"
70
71# Set a higher stacktrace during development. Avoid configuring such
72# in production as building large stacktraces may be expensive.
73config :phoenix, :stacktrace_depth, 20
74
75# Initialize plugs at runtime for faster development compilation
76config :phoenix, :plug_init_mode, :runtime
77
78config :phoenix_live_view,
79 # Include debug annotations and locations in rendered markup.
80 # Changing this configuration will require mix clean and a full recompile.
81 debug_heex_annotations: true,
82 debug_attributes: true,
83 # Enable helpful, but potentially expensive runtime checks
84 enable_expensive_runtime_checks: true
85
86config :atex, Atex.OAuth,
87 base_url: "http://127.0.0.1:4000/oauth",
88 private_key:
89 "MHcCAQEEIGA8RFx1QUfvdVPD24SvBMS6a0X9fPYx6EPLHttG55ScoAoGCCqGSM49AwEHoUQDQgAEcGzUFa2vMqnevHI5R+QByCmHSCfVy7Uge3VcL5GPVL/tBMeoVizxZey3MUekIHZ981iXW8fTbntYJNXMi2hN5w==",
90 is_localhost: true