1# This file is responsible for configuring your application
2# and its dependencies with the aid of the Config module.
3#
4# This configuration file is loaded before any dependency and
5# is restricted to this project.
6
7# General application configuration
8import Config
9
10config :comet,
11 ecto_repos: [Comet.Repo],
12 generators: [timestamp_type: :utc_datetime, binary_id: true]
13
14# Configure the endpoint
15config :comet, CometWeb.Endpoint,
16 url: [host: "localhost"],
17 adapter: Bandit.PhoenixAdapter,
18 render_errors: [
19 formats: [html: CometWeb.ErrorHTML, json: CometWeb.ErrorJSON],
20 layout: false
21 ],
22 pubsub_server: Comet.PubSub,
23 live_view: [signing_salt: "ObastmTN"]
24
25# Configure the mailer
26#
27# By default it uses the "Local" adapter which stores the emails
28# locally. You can see the emails in your browser, at "/dev/mailbox".
29#
30# For production it's recommended to configure a different adapter
31# at the `config/runtime.exs`.
32config :comet, Comet.Mailer, adapter: Swoosh.Adapters.Local
33
34# Configure esbuild (the version is required)
35config :esbuild,
36 version: "0.25.4",
37 comet: [
38 args:
39 ~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --loader:.woff2=file --alias:@=.),
40 cd: Path.expand("../assets", __DIR__),
41 env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]}
42 ]
43
44# Configure tailwind (the version is required)
45config :tailwind,
46 version: "4.1.12",
47 comet: [
48 args: ~w(
49 --input=assets/css/app.css
50 --output=priv/static/assets/css/app.css
51 ),
52 cd: Path.expand("..", __DIR__)
53 ],
54 version_check: false,
55 path:
56 System.get_env(
57 "TAILWINDCSS_PATH",
58 Path.expand("../assets/node_modules/.bin/tailwindcss", __DIR__)
59 )
60
61# Configure Elixir's Logger
62config :logger, :default_formatter,
63 format: "$time $metadata[$level] $message\n",
64 metadata: [:request_id]
65
66# Use Jason for JSON parsing in Phoenix
67config :phoenix, :json_library, Jason
68
69# Import environment specific config. This must remain at the bottom
70# of this file so it overrides the configuration defined above.
71import_config "#{config_env()}.exs"