-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
60 lines (42 loc) · 1.34 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
erlReis
What is this?
-------------
An erlang client to access the geonames api.
Why are you doing this?
-----------------------
this has started as a learning experiment for me with erlang
it might change depending on my time and desire
What's up with the name?
------------------------
Every software project has to have a decent name right? ;)
Piri Reis was a Turkish admiral/cartographer who may have
mapped Antartica three centuries before it was officially
discovered.
How does this work?
-------------------
1) start up erl
[user@host] $ erl
2) compile our code
Erlang (BEAM) emulator version 5.6.2 [source] [64-bit] [smp:2] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.6.2 (abort with ^G)
1> c(geonames.erl).
3) start the web server
2> inets:start().
ok
4) run our function
3> geonames:city_from_zip("65201").
{"HE","Wiesbaden"}
4> geonames:cities_by_bound("44.1", "-10", "-22.4", "55.2").
{"Mexico City"}
So did you test any of this shit yet?
-------------------------------------
We have 4 passing tests right now.
I want to figure out howto make an
automated test runner that could be
integrated with autotest or something
similar.
If you would like to test the code
you'll need to download eunit
and throw a line similar to:
code:add_pathz("/home/myuser/eunit/ebin").
in your ~/.erlang.