Setup
Installation
mix archive.install hex phx_newSetup
Create Boilerplate
mix phx.new react_phoenixFlags:
--no-ectoto not have database stuff
Create secrets in
.envand db secretsmix phx.gen.secret.env - need to move db config to
.config.exexport DB_USERNAME="test_user" export DB_PASSWORD="LONGTESTPASSWORD" export DB_DATABASE="pi_test" export DB_HOSTNAME="SOMELONGTHING.oregon-postgres.render.com" export SECRET_KEY_BASE="SOMEExTREMELYLONGSECRETKE"
Follow steps it prompts you with, then start with:
mix phx.server
iex -S mix phx.server #interactive run, `recompile()`, can run all the models like Ss.Accounts.list_usersPhoenix uses webpack or esbuild for asset management and needs npm*
Main work will be in lib
DB
Local: idk. By Postgres default, the username is the default machine name like jfuentes(whoami in bash) and no password ""
AWS: Before running mix ecto.create go into config/dev.ex and change the db connection settings to the AWS one. Creates a database of that name if it doesn't exist
Last updated