Capitalize app name.
This commit is contained in:
parent
e2578a9e59
commit
83bad3bd52
|
@ -7,12 +7,12 @@
|
|||
# General application configuration
|
||||
import Config
|
||||
|
||||
config :jol,
|
||||
config :JOL,
|
||||
ecto_repos: [JOL.Repo],
|
||||
generators: [timestamp_type: :utc_datetime]
|
||||
|
||||
# Configures the endpoint
|
||||
config :jol, JOLWeb.Endpoint,
|
||||
config :JOL, JOLWeb.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
adapter: Bandit.PhoenixAdapter,
|
||||
render_errors: [
|
||||
|
@ -29,7 +29,7 @@ config :jol, JOLWeb.Endpoint,
|
|||
#
|
||||
# For production it's recommended to configure a different adapter
|
||||
# at the `config/runtime.exs`.
|
||||
config :jol, JOL.Mailer, adapter: Swoosh.Adapters.Local
|
||||
config :JOL, JOL.Mailer, adapter: Swoosh.Adapters.Local
|
||||
|
||||
# Configure esbuild (the version is required)
|
||||
config :esbuild,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Config
|
||||
|
||||
# Configure your database
|
||||
config :jol, JOL.Repo,
|
||||
config :JOL, JOL.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
|
@ -16,7 +16,7 @@ config :jol, JOL.Repo,
|
|||
# The watchers configuration can be used to run external
|
||||
# watchers to your application. For example, we can use it
|
||||
# to bundle .js and .css sources.
|
||||
config :jol, JOLWeb.Endpoint,
|
||||
config :JOL, JOLWeb.Endpoint,
|
||||
# Binding to loopback ipv4 address prevents access from other machines.
|
||||
# Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
|
||||
http: [ip: {127, 0, 0, 1}, port: 4000],
|
||||
|
@ -25,8 +25,8 @@ config :jol, JOLWeb.Endpoint,
|
|||
debug_errors: true,
|
||||
secret_key_base: "9rmK754o3RoBXorXcCf0PTZkCJbfAOdNGyXSQizgF5CYcd9iQTR2UhaNGw5v74DR",
|
||||
watchers: [
|
||||
esbuild: {Esbuild, :install_and_run, [:jol, ~w(--sourcemap=inline --watch)]},
|
||||
tailwind: {Tailwind, :install_and_run, [:jol, ~w(--watch)]}
|
||||
esbuild: {Esbuild, :install_and_run, [:JOL, ~w(--sourcemap=inline --watch)]},
|
||||
tailwind: {Tailwind, :install_and_run, [:JOL, ~w(--watch)]}
|
||||
]
|
||||
|
||||
# ## SSL Support
|
||||
|
@ -53,7 +53,7 @@ config :jol, JOLWeb.Endpoint,
|
|||
# different ports.
|
||||
|
||||
# Watch static and templates for browser reloading.
|
||||
config :jol, JOLWeb.Endpoint,
|
||||
config :JOL, JOLWeb.Endpoint,
|
||||
live_reload: [
|
||||
patterns: [
|
||||
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
|
||||
|
@ -63,7 +63,7 @@ config :jol, JOLWeb.Endpoint,
|
|||
]
|
||||
|
||||
# Enable dev routes for dashboard and mailbox
|
||||
config :jol, dev_routes: true
|
||||
config :JOL, dev_routes: true
|
||||
|
||||
# Do not include metadata nor timestamps in development logs
|
||||
config :logger, :console, format: "[$level] $message\n"
|
||||
|
|
|
@ -5,7 +5,7 @@ import Config
|
|||
# manifest is generated by the `mix assets.deploy` task,
|
||||
# which you should run after static files are built and
|
||||
# before starting your production server.
|
||||
config :jol, JOLWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
|
||||
config :JOL, JOLWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
|
||||
|
||||
# Configures Swoosh API Client
|
||||
config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: JOL.Finch
|
||||
|
|
|
@ -17,7 +17,7 @@ import Config
|
|||
# Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
|
||||
# script that automatically sets the env var above.
|
||||
if System.get_env("PHX_SERVER") do
|
||||
config :jol, JOLWeb.Endpoint, server: true
|
||||
config :JOL, JOLWeb.Endpoint, server: true
|
||||
end
|
||||
|
||||
if config_env() == :prod do
|
||||
|
@ -30,7 +30,7 @@ if config_env() == :prod do
|
|||
|
||||
maybe_ipv6 = if System.get_env("ECTO_IPV6") in ~w(true 1), do: [:inet6], else: []
|
||||
|
||||
config :jol, JOL.Repo,
|
||||
config :JOL, JOL.Repo,
|
||||
# ssl: true,
|
||||
url: database_url,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
||||
|
@ -51,9 +51,9 @@ if config_env() == :prod do
|
|||
host = System.get_env("PHX_HOST") || "example.com"
|
||||
port = String.to_integer(System.get_env("PORT") || "4000")
|
||||
|
||||
config :jol, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
||||
config :JOL, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
||||
|
||||
config :jol, JOLWeb.Endpoint,
|
||||
config :JOL, JOLWeb.Endpoint,
|
||||
url: [host: host, port: 443, scheme: "https"],
|
||||
http: [
|
||||
# Enable IPv6 and bind on all interfaces.
|
||||
|
@ -70,7 +70,7 @@ if config_env() == :prod do
|
|||
# To get SSL working, you will need to add the `https` key
|
||||
# to your endpoint configuration:
|
||||
#
|
||||
# config :jol, JOLWeb.Endpoint,
|
||||
# config :JOL, JOLWeb.Endpoint,
|
||||
# https: [
|
||||
# ...,
|
||||
# port: 443,
|
||||
|
@ -92,7 +92,7 @@ if config_env() == :prod do
|
|||
# We also recommend setting `force_ssl` in your config/prod.exs,
|
||||
# ensuring no data is ever sent via http, always redirecting to https:
|
||||
#
|
||||
# config :jol, JOLWeb.Endpoint,
|
||||
# config :JOL, JOLWeb.Endpoint,
|
||||
# force_ssl: [hsts: true]
|
||||
#
|
||||
# Check `Plug.SSL` for all available options in `force_ssl`.
|
||||
|
@ -103,7 +103,7 @@ if config_env() == :prod do
|
|||
# Also, you may need to configure the Swoosh API client of your choice if you
|
||||
# are not using SMTP. Here is an example of the configuration:
|
||||
#
|
||||
# config :jol, JOL.Mailer,
|
||||
# config :JOL, JOL.Mailer,
|
||||
# adapter: Swoosh.Adapters.Mailgun,
|
||||
# api_key: System.get_env("MAILGUN_API_KEY"),
|
||||
# domain: System.get_env("MAILGUN_DOMAIN")
|
||||
|
|
|
@ -5,7 +5,7 @@ import Config
|
|||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :jol, JOL.Repo,
|
||||
config :JOL, JOL.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
|
@ -15,13 +15,13 @@ config :jol, JOL.Repo,
|
|||
|
||||
# We don't run a server during test. If one is required,
|
||||
# you can enable the server option below.
|
||||
config :jol, JOLWeb.Endpoint,
|
||||
config :JOL, JOLWeb.Endpoint,
|
||||
http: [ip: {127, 0, 0, 1}, port: 4002],
|
||||
secret_key_base: "TcmWd6GafOT64XVzHiK6e6Yub8o8jhoi4gMK5K4PlAXyD7nfwzjsutXiMDifprgw",
|
||||
server: false
|
||||
|
||||
# In test we don't send emails.
|
||||
config :jol, JOL.Mailer, adapter: Swoosh.Adapters.Test
|
||||
config :JOL, JOL.Mailer, adapter: Swoosh.Adapters.Test
|
||||
|
||||
# Disable swoosh api client as it is only required for production adapters.
|
||||
config :swoosh, :api_client, false
|
||||
|
|
|
@ -10,7 +10,7 @@ defmodule JOL.Application do
|
|||
children = [
|
||||
JOLWeb.Telemetry,
|
||||
JOL.Repo,
|
||||
{DNSCluster, query: Application.get_env(:jol, :dns_cluster_query) || :ignore},
|
||||
{DNSCluster, query: Application.get_env(:JOL, :dns_cluster_query) || :ignore},
|
||||
{Phoenix.PubSub, name: JOL.PubSub},
|
||||
# Start the Finch HTTP client for sending emails
|
||||
{Finch, name: JOL.Finch},
|
||||
|
|
|
@ -3,7 +3,7 @@ defmodule JOL.Blog do
|
|||
|
||||
use NimblePublisher,
|
||||
build: Post,
|
||||
from: Application.app_dir(:jol, "priv/posts/**/*.md"),
|
||||
from: Application.app_dir(:JOL, "priv/posts/**/*.md"),
|
||||
as: :posts
|
||||
|
||||
@posts Enum.sort_by(@posts, & &1.date, {:desc, Date})
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
defmodule JOL.Mailer do
|
||||
use Swoosh.Mailer, otp_app: :jol
|
||||
use Swoosh.Mailer, otp_app: :JOL
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
defmodule JOL.Repo do
|
||||
use Ecto.Repo,
|
||||
otp_app: :jol,
|
||||
otp_app: :JOL,
|
||||
adapter: Ecto.Adapters.Postgres
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
defmodule JOLWeb.Endpoint do
|
||||
use Phoenix.Endpoint, otp_app: :jol
|
||||
use Phoenix.Endpoint, otp_app: :JOL
|
||||
|
||||
# The session will be stored in the cookie and signed,
|
||||
# this means its contents can be read but not tampered with.
|
||||
|
@ -21,7 +21,7 @@ defmodule JOLWeb.Endpoint do
|
|||
# when deploying your static files in production.
|
||||
plug Plug.Static,
|
||||
at: "/",
|
||||
from: :jol,
|
||||
from: :JOL,
|
||||
gzip: false,
|
||||
only: JOLWeb.static_paths()
|
||||
|
||||
|
@ -31,7 +31,7 @@ defmodule JOLWeb.Endpoint do
|
|||
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
|
||||
plug Phoenix.LiveReloader
|
||||
plug Phoenix.CodeReloader
|
||||
plug Phoenix.Ecto.CheckRepoStatus, otp_app: :jol
|
||||
plug Phoenix.Ecto.CheckRepoStatus, otp_app: :JOL
|
||||
end
|
||||
|
||||
plug Phoenix.LiveDashboard.RequestLogger,
|
||||
|
|
|
@ -20,5 +20,5 @@ defmodule JOLWeb.Gettext do
|
|||
|
||||
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
|
||||
"""
|
||||
use Gettext, otp_app: :jol
|
||||
use Gettext, otp_app: :JOL
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ defmodule JOLWeb.Router do
|
|||
# end
|
||||
|
||||
# Enable LiveDashboard and Swoosh mailbox preview in development
|
||||
if Application.compile_env(:jol, :dev_routes) do
|
||||
if Application.compile_env(:JOL, :dev_routes) do
|
||||
# If you want to use the LiveDashboard in production, you should put
|
||||
# it behind authentication and allow only admins to access it.
|
||||
# If your application does not have an admins-only section yet,
|
||||
|
|
Loading…
Reference in a new issue