Skip to content

Revaycolizer/phoenix-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create a New Phoenix API Project

To create a new API-only Phoenix project, you can use the phx.new generator with the --no-html and --no-assets flags.

mix phx.new my_api --no-html --no-assets

Install Dependency

mix deps.get

Generate User With Password Field

mix phx.gen.json Accounts User users name:string email:string password:string

###For Handling JWT Add This in Mix.exs

defp deps do
  [
    {:joken, "~> 2.0"},
    {:bcrypt_elixir, "~> 2.0"},
  ]
end

MyApi

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages