Questions tagged [mochiweb]

MochiWeb is an Erlang library for building lightweight HTTP servers.

MochiWeb is an Erlang library for building lightweight HTTP servers.

Getting started

  1. Download mochiweb from official repository on GitHub.
  2. Watch Video Tutorial To Start Developing Web Applications on Erlang.
  3. Ask questions.

Community

There's a group of users of mochiweb on Google, where you can find other useful info and talk to its developers.

70 questions
2
votes
3 answers

Mochiweb mnesia requests

I'm trying to link Mochiweb with my ejabberd mnesia db and am unable to do any mnesia transactions in my controllers. I test my controllers without the mnesia transactions and they work fine. I am using application:start(mnesia) inside the start…
ewindsor
  • 885
  • 10
  • 24
2
votes
1 answer

what this error means? [Erlang, mochiweb, MySQL]

I made a comet chat server with Erlang and Mochiweb. And I run the "./start-dev.sh" to start the server. But after about 1 month I got the following error: =ERROR REPORT==== 26-Sep-2009::09:21:06 === {mochiweb_socket_server,235, {child_error, …
Mickey Shine
  • 12,187
  • 25
  • 96
  • 148
2
votes
1 answer

Mnesia Replication and Large Numbers of Dirty Operations

Some applications require really fast response, to meet their expectations to users. I am building one such application and i am using mnesia. Now, when we by-pass the mnesia transaction manager , we approach good performance. However, this is the…
Muzaaya Joshua
  • 7,736
  • 3
  • 47
  • 86
2
votes
1 answer

How can I make Webmachine and eredis work together?

I've been meditating on the question of Redis usage in my Webmachine application for a week. And I haven't enlightened yet. I'm going to use Eredis and here is an example of usage: {ok, Con} = eredis:start_link(). {ok, <<"OK">>} = eredis:q(Con,…
N.A.
  • 69
  • 4
1
vote
2 answers

Exception error: undefined function in Mochiweb/Erlang

After seeing this article, I have been tinkering with mochiweb. While trying to replicate what's done in the article - basically setting up a mochiweb server, having two erlang nodes, and then calling a function defined in one node in the other…
thomas55
  • 891
  • 2
  • 9
  • 12
1
vote
3 answers

How do I use mochijson to encode an array of objects?

I have two objects that I'd like to bundle up and ship in an array, encoded as JSON with mochijson. They are: > Book0 = {struct, [{"title", "a book"}, {"id", "1"}]}. > Book1 = {struct, [{"title", "another book"}, {"id", "2"}]}. However, >…
troutwine
  • 3,721
  • 3
  • 28
  • 62
1
vote
1 answer

CouchDB/MochiWeb SSL error

I used CouchDB 1.1.1 with self-signed certs fine for some time. Then, I purchased a SSL cert (in PFX form) for my domain. I converted it to .CER and .KEY via OpenSSL, as described here: How can I convert a PFX certificate file for use with Apache on…
wizzard0
  • 1,883
  • 1
  • 15
  • 38
1
vote
1 answer

Confused about Nitrogen listen IP address

Am running Nitrogen 2.0.X on Windows 7 Home Premium, HP Pavilion Entertainment PC Laptop. Nitrogen starts with inets and i have failed to change or dictate the IP address of the webserver. Once it starts, it tells me to go to my browser and hit…
Muzaaya Joshua
  • 7,736
  • 3
  • 47
  • 86
1
vote
3 answers

How to pattern match structures returned by mochijson2?

I've just started tinkering with Erlang and am building a very simple test web application which is just intended to show my twitter timeline. I'm using webmachine to write the app and erlyDTL to render the templates. My question is related to the…
peeb
  • 11
  • 2
1
vote
3 answers

How to test a mochiweb application?

I would like to do high level testing of my mochiweb app, like it is possible to do in Python with WebTest, in Django with the test client and in Ruby on Rails with functional or integration testing. I'm not too picky about how to do it. Basically I…
Alex Marandon
  • 4,034
  • 2
  • 17
  • 21
1
vote
2 answers

Is there any html parser for yaws?

I am writing an application in erlang on yaws server. I want to extract data from some html page but their seems to be no good way to do this on yaws. There is a method using mochiweb_html but then it is for mochiweb server and not yaws. What should…
Rana
  • 51
  • 7
1
vote
1 answer

CouchDb Crashes with no reason in the crash report

CouchDb keeps crashing and outputs the following log. I tried searching the CouchDb guides as to what the crash reason is, but I couldn't find anything. It appears that the reason is a badmatch but I am not sure what the bad match would be. Any idea…
TheDude
  • 3,796
  • 2
  • 28
  • 51
1
vote
1 answer

Starting two mochiweb servers with a single script file

I have a basic web server that I generated from the mochiweb framework. To start it I use the start.sh script that the framework automatically generates. Everything works fine and the server starts up. Now I have one more mochiweb server that I want…
ErJab
  • 6,056
  • 10
  • 42
  • 54
1
vote
1 answer

Mochiweb : Reading a file as it is uploaded

I want to be able to read a file just as it is being uploaded by the user, i.e. I want to read the incoming stream of bytes from the user's browser.. Is that possible with Mochiweb? If not, where do I need to look/modify? If something else easier…
jeffreyveon
  • 13,400
  • 18
  • 79
  • 129
1
vote
3 answers

Mochiweb Log files

Anyone know where Mochiweb logs files by default? I'm running it along with the Beepbeep framework.
ewindsor
  • 885
  • 10
  • 24