mix beacon.gen.site (Beacon v0.4.1)
View SourceGenerates a new Beacon site in the current project.
Remember to execute mix beacon.install
first if this is the first site you're generating in your project and you have not installed Beacon yet.
Examples
mix beacon.gen.site --site my_site
mix beacon.gen.site --site my_site --path / --host my_site.com
Options
--site
(required) - The name of your site. Should not contain special characters nor start with "beacon_"--path
(optional) - Where your site will be mounted. Follows the same convention as Phoenix route prefixes. Defaults to"/"
--host
(optional) - If provided, site will be served on that host.--port
(optional) - The port to use for http requests. Only needed when--host
is provided. If no port is given, one will be chosen at random.--secure-port
(optional) - The port to use for https requests. Only needed when--host
is provided. If no port is given, one will be chosen at random.--endpoint
(optional) - The name of the Endpoint Module for your site. If not provided, a default will be generated based on thesite
. For example,beacon.gen.site --site my_site
will useMySiteEndpoint
--secret-key-base
(optional) - The value to use for secret_key_base in your app config. By default, Beacon will generate a new value and update all existing config to match that value. If you don't want this behavior, copy the secret_key_base from your app config and provide it here.--signing-salt
(optional) - The value to use for signing_salt in your app config. By default, Beacon will generate a new value and update all existing config to match that value. But in order to avoid connection errors for existing clients, it's recommened to copy thesigning_salt
from your app config and provide it here.--session-key
(optional) - The value to use for key in the session config. Defaults to"_your_app_name_key"
--session-same-site
(optional) - Set the cookie session SameSite attributes. Defaults to "Lax"