This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
needle.post('http://leadpophq.com/external/forms/abc', {"a": "b"}) | |
.on('end', function(response) { | |
console.log(response) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
include Warden::Test::Helpers | |
Warden.test_mode! | |
RSpec.describe "adding a card", :type => :feature, :js => true do | |
# before :each do | |
# @event = FactoryGirl.create(:stubbed_event, owner: @user) | |
# end | |
before do | |
user = FactoryGirl.create(:user) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Test.Mixfile do | |
use Mix.Project | |
def project do | |
[deps: deps] | |
end | |
defp deps do | |
[ | |
{:oauth2ex, git: "https://github.com/j-mcnally/oauth2ex.git", ref: "d0be43e8246e2b393eff3c103fdaf87071e1e8b9"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Mix.Config | |
config :phoenix, Struct.Router, | |
port: System.get_env("PORT") || 4000, | |
ssl: false, | |
host: "localhost", | |
github_callback: "http://localhost:4000", | |
cookies: true, | |
session_key: "_struct_key", | |
session_secret: "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Exq.RouterPlug do | |
require Logger | |
alias Exq.RouterPlug.Router | |
def init(options), do: options | |
def call(conn, opts) do | |
namespace(conn, opts, opts[:namespace] || "exq") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Plug.StaticRoot do | |
def init(opts), do: opts | |
def call(conn, opts) do | |
rootify(conn, opts, opts[:to] || "index.html") | |
end | |
def rootify(%Plug.Conn{path_info: []} = conn, opts, to) do | |
%Plug.Conn{conn | path_info: [to]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Exq.RouterPlug do | |
require Logger | |
import Plug.Conn | |
use Plug.Router | |
plug :match | |
plug :dispatch | |
def init(options), do: options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location /ws { | |
proxy_buffering off; | |
proxy_read_timeout 86400s; | |
proxy_send_timeout 86400s; | |
proxy_pass http://app/ws; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Exq.RouterPlug do | |
require Logger | |
import Plug.Conn | |
use Plug.Router | |
plug :match | |
plug :dispatch | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Exq.RouterPlug do | |
import Plug.Conn | |
use Plug.Router | |
plug :match | |
plug :dispatch | |
get "/queues" do | |
IO.puts "YOLO" | |
conn |