Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:
Permalink: git.io/vps
| Provider | Type | RAM | Cores | Storage | Transfer | Network | Price |
|---|
| #!/usr/bin/env python | |
| import sys | |
| import re | |
| import textwrap | |
| def str2txt(srt): | |
| lines = re.sub(r'^$\n|^[0-9].*\n|^\n','', srt, flags=re.MULTILINE | re.UNICODE) | |
| print(textwrap.fill(lines, 70)) | |
| if __name__ == '__main__': |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Color Space</key> | |
| <string>sRGB</string> | |
| <key>Blue Component</key> | |
| <real>0.25882352941176473</real> |
Permalink: git.io/vps
| Provider | Type | RAM | Cores | Storage | Transfer | Network | Price |
|---|
If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8
To use the new phx.new project generator, you can install the archive with the following command:
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:
How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?
These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.
By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.
This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.
For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai
| # use Mix.Config | |
| # config :constants, | |
| # :some_string: "some_string", | |
| # :range_i_like: 1..5, | |
| # :a_map: %{letters: ~w(a b c)} | |
| defmodule Constants.Macro do | |
| # Take code and convert to AST | |
| # Inject name into quoted expression as the name of the macro |
| defmodule MdToolbox.Api.SoapMethod do | |
| alias __MODULE__ | |
| alias MdToolbox.Api.Request | |
| @doc "Builds the request from params" | |
| @callback build_request(params :: list()) :: map() | |
| @doc "Parses the request's response into data" | |
| @callback parse_response(request :: Request.t()) :: Request.t() |
| # This is the target module which will be overwritten after dynamic compilation | |
| # You'll be using this to read configuration in your code. For instance, if you | |
| # have a configuration key called `:redis_timeout`, you could read it using | |
| # `MM.Config.get(:redis_timeout)` | |
| defmodule MM.Config do | |
| # we use a default implementation which raises an error when our code tries | |
| # to read configuration before it is compiled. | |
| def get(_key), do: raise("Config has not been compiled yet!") | |
| end |