[erlang-questions] Beginners tutorials

Joe Armstrong erlang@REDACTED
Thu Jun 12 16:54:37 CEST 2014


Re: Garrett's great talk at EUC2014

The point has been made many times before that
"There are no easy Erlang getting started guides"

So I thought I'd take a look at Node.js.

The node js home page (node.js) starts with a simple example


<quote>
var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

To run the server, put the code into a file example.js and execute it with
the node program from the command line:

% node example.js
Server running at http://127.0.0.1:1337/
</endquote>

It's pretty easy to knock up an almost identical example in Erlang - using
any of the well-known web
servers in the background, unfortunately this has not been done, or if it
has been done
it's not easy to find the examples (or if there are examples I can't find
them)

I was vaguely thinking of making some examples that are more-or-less
isomorphic to the
node.js examples and then applying small transformation steps to turn then
from idiomatic node.js code to idiomatic Erlang code.

Although I could find a simple hello world example in node.js I could not
find a tutorial that
started with a simple example and then built on it in very small steps
adding routing, authentication,
database access and so on.

Does anybody know of some examples of node.js that could be used for this.

Cheers

/Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140612/a685c020/attachment.htm>


More information about the erlang-questions mailing list