- Go to Digital Ocean
- Create new droplet
- London
- Ubuntu
- No apps
- Add SSH keys
// | |
// RxAlamofireObjMapper.swift | |
// RXDemo | |
// | |
// Created by Yaqing Wang on 10/30/15. | |
// Copyright © 2015 billwang1990.github.io. All rights reserved. | |
// | |
import Foundation | |
import Alamofire |
/*: | |
Brandon Williams | |
# Lenses in Swift | |
*/ | |
/*: | |
## i.e. Functional getters and setters |
import Foundation | |
protocol Cipher { | |
func encrypt(message: String, secret: Int) -> String | |
func decrypt(message: String, secret: Int) -> String | |
} | |
struct XOR: Cipher { | |
private func impl(message: String, secret: Int) -> String? { |
package log | |
import ( | |
"fmt" | |
"github.com/Sirupsen/logrus" | |
"runtime" | |
"strings" | |
) | |
var logger = logrus.New() |
By the end of this quick guide, you will know how to compile a Phoenix app release using Exrm and run it inside a Docker container. I've found only a couple of articles that discuss getting an Elixir app up and running inside a Docker container, and even those only touched on some parts of the process. The idea is that this guide will give you a full end-to-end example of how to get all the pieces and parts working together so that you are able to deploy your Phoenix application inside a Docker container.
- You already have a working Elixir environment with the Phoenix Framework installed
- You have at least basic working knowledge of Docker, and have installed the Docker tools onto your local environment
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
:
- By Paul Smith March 20, 2015
- Updated by: Brett Holt May 5, 2016
Note: This guide was written for Phoenix 1.1.4. Parts of it may no longer work if you are using a newer version.
Let’s build a JSON API that serves a list of contacts. We’ll be writing it using Elixir (version 1.2.5) and Phoenix (version 1.1.4). Phoenix is a framework written in Elixir that aims to make writing fast, low latency web applications as enjoyable as possible.
Source Code: The source code after finishing this guide can be found here.