Questions tagged [cowboy]

Cowboy is a small, fast and modular HTTP server written in Erlang. Cowboy is also a socket acceptor pool, able to accept connections for any kind of TCP protocol.

Cowboy is a small, fast and modular HTTP server written in Erlang. Cowboy is also a socket acceptor pool, able to accept connections for any kind of TCP protocol.

https://github.com/extend/cowboy/

248 questions
0
votes
2 answers

Cowboy rest handler and gen_servers communication

I have cowboy rest handler which should spawn couple gen_servers. What is the best way to send/handle messages in my cowboy handler? Is there only one possibility to send message from gen_server to handler using "!" operator?
Max Grigoriev
  • 1,021
  • 2
  • 13
  • 29
0
votes
2 answers

Message broadcasting using rabbitmq, genbunny and cowboy event notifier

I have two instances of cowboy server running which are connected to RabbitMQ. I am using gen_bunny as RabbitMQ client to connect to RabbitMQ. I can consume the message to from rabbitMQ if using bunnyc:consume(). However for that I need to fire…
Jack Daniel's
  • 2,583
  • 22
  • 28
0
votes
2 answers

Erlang RabbitMQ client example not working

Erlang RabbitMQ Client not working...(http://www.rabbitmq.com/erlang-client-user-guide.html) Somehow my RabbitMQ Erlang client is not working.. It gives "can't find amqp_client.hrl" error when i try to compile it using ERL_LIBS=deps erlc -o ebin…
Jack Daniel's
  • 2,583
  • 22
  • 28
0
votes
1 answer

Linking with cowboy process which handles the websocket connection (cowboy, erlang)

I'm developing an erlang app which use both cowboy and sockjs and I wonder if is it possible to link with the cowboy process which handles the websocket connection? Right now process with gen_server behaviour is associated with each websocet…
Def_NulL
  • 87
  • 4
0
votes
2 answers

Error reports in Erlang

I've taken the cowboy example code and brooken it. The code for the default request handler looked like this: -module(default_handler). -behaviour(cowboy_http_handler). -export([init/3, handle/2, terminate/2]). init({_Any, http}, Req, []) -> …
Martin Kristiansen
  • 9,875
  • 10
  • 51
  • 83
-1
votes
0 answers

error: undefined function router/2 (expected MyApp.Endpoint to define such a function or for it to be imported, but none are available)

I have this elixir module: defmodule MyApp.Router do use Plug.Router plug :match plug :dispatch get "/" do send_resp(conn, 200, "Hello, World!") end end I run mix compile --no-halt and I get: % mix run --no-halt ===> Analyzing…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
-1
votes
1 answer

Simple Elixir / Plug Processes Issue - PID not sticking around

I'm just starting out in Elixir and wanted to build a very simple API with Plug. I used this guide to get a very simple API up and running. Basically, the problem I'm facing is that the process that I registered as :qs doesn't seem to be found (and…
qarthandso
  • 2,100
  • 2
  • 24
  • 40
-1
votes
1 answer

Erlang Cowboy Constraints Coding

{"/:myobj/get:id",Constraints, constraints_handler, [list]}, {"/:myobj/list",Constraints, constraints_handler, [list]}, {"/:myobj/save",Constraints, constraints_handler, [save]}, {"/:myobj/update",Constraints, constraints_handler,…
excode
  • 19
  • 3
1 2 3
16
17