Before that, though, we need to create a Nexmo account and receive our API credentials. Your Phoenix server is up and running! Now let's set up our application to interact with the Nexmo SMS API and start sending text messages. If you now run mix phx.server and navigate to in your browser you will see a welcome page from Phoenix. You can modify the Phoenix database settings in config/devs.exs first, and once you are ready, you run mix ecto.create from your console to set up the database for your application. By default, Phoenix uses PostgreSQL and assumes that there is a postgres/postgres PostgreSQL superuser. Once in there, we need to create the database for our application. Go ahead and cd into your new app directory. Phoenix uses npm to fetch and install its Node dependencies. For simplicity sake, I would recommend answering in the affirmative to the setup prompts when it asks you if you want to install dependencies. This will create the basics of your new application inside a /sms_app directory. Once you have the language and the framework installed, you can create a new Phoenix app by running the following command from your console:Įnter fullscreen mode Exit fullscreen mode You can use their guides here and here to get up and running with the installation. The first thing that you need is to make sure that both Elixir and Phoenix are installed on your system. I took the dive and started working my way through the Elixir tutorials, and this past weekend created my first simple Phoenix app with the ability to interact with the Nexmo SMS API and send text messages. It, like Elixir, is built to be intuitive and with a low barrier to entry.Īs someone who does a lot of work in Ruby, and in Rails, I have been wanting to learn Elixir and Phoenix for a while. ![]() The most popular web framework in the Elixir ecosystem is Phoenix. It is a functional language with an intuitive syntax and a supportive community around it. The Elixir programming language has been steadily gaining more adoption by developers, and for good reason.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |