Initial Commit to Add RestAPI Server to IEC
[iec.git] / src / foundation / api / apiserver / README.md
1 # Welcome to IEC API Server
2
3 The IEC API server is built on Revel web framework. So the following information is
4 inherited from [Revel](https://github.com/revel/revel).
5 We changed the default listening port of Revel from 9000 to 9131, which may be special
6 for IEC use.
7
8 # Welcome to Revel
9
10 A high-productivity web framework for the [Go language](http://www.golang.org/).
11
12
13 ### Start the web server:
14
15     revel run apiserver prod
16
17 ### Go to http://localhost:9131/v1/iec/status and you'll see:
18
19     {"Status":"ok","Passed":true}
20
21 ## Code Layout
22
23 The directory structure of a generated Revel application:
24
25     conf/             Configuration directory
26         app.conf      Main app configuration file
27         routes        Routes definition file
28
29     app/              App sources
30         init.go       Interceptor registration
31         controllers/  App controllers go here
32         views/        Templates directory
33
34     messages/         Message files
35
36     public/           Public static assets
37         css/          CSS files
38         js/           Javascript files
39         images/       Image files
40
41     tests/            Test suites
42
43
44 ## Help
45
46 * The [Getting Started with Revel](http://revel.github.io/tutorial/gettingstarted.html).
47 * The [Revel guides](http://revel.github.io/manual/index.html).
48 * The [Revel sample apps](http://revel.github.io/examples/index.html).
49 * The [API documentation](https://godoc.org/github.com/revel/revel).
50