Skip to content

An (Elixir/Phoenix) proof of concept (POC), the purpose of which is to verify that certain functional concepts have the potential for real-world application.

Notifications You must be signed in to change notification settings

ecamalionte/pocapi

Repository files navigation

Pocapi

An (Elixir/Phoenix) proof of concept (POC), the purpose of which is to verify that certain functional concepts have the potential for real-world application.

To configure:

  • mix deps.get
  • mix ecto.create
  • ecto.migrate
  • mix test

To start your Phoenix app:

  • Start Phoenix endpoint with mix phoenix.server
  • Now you can visit localhost:4000 from your browser.

To pack this application:

  • ./node_modules/brunch/bin/brunch b -p build’s your assets in production mode. More detail can be found in the Phoenix Static Asset Guide
  • MIX_ENV=prod mix phoenix.digest To compress and tag your assets for proper caching. More detail can be found in the Phoenix Mix Task Guide
  • mix release --env=prod To actually generate a release for a production environment
  • Run MIX_ENV=prod mix release --env=prod. See Distillery for more information
  • Ready to run in production!
  • check deployment guides.

To deploy on AWS:

  • scp -i ~/.ssh/MyKeyPair.pem package ec2-user@instance.compute.amazonaws.com:~\

To hack as DevOps on AWS:

  • ssh -i ~/.ssh/MyKeyPair.pem ec2-user@instance.compute.amazonaws.com

Commands History

How this app was created:

  • Create the app mix phoenix.new pocapi
  • Create a Database on Postgres mix ecto.create
  • I had to access the postgres psql postgres, and alter the role ALTER USER postgres SUPERUSER;
  • It could be done with createuser -s postgres for creating and setting Superuser role.
  • Create a Database on Postgres mix ecto.create
  • Create a CRUD for Products mix phoenix.gen.html Product products name:string description:string rating:integer price:float
  • Run Database migration mix ecto.migrate

Learn more

About

An (Elixir/Phoenix) proof of concept (POC), the purpose of which is to verify that certain functional concepts have the potential for real-world application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published