1
1
gin [ ![ wercker status] ( https://app.wercker.com/status/f413ccbd85cfc4a58a37f03dd7aaa87e " wercker status ")] ( https://app.wercker.com/project/bykey/f413ccbd85cfc4a58a37f03dd7aaa87e )
2
2
========
3
3
4
- ` gin ` is a simple command line utility for live-reloading Go web applications.
5
- Just run ` gin ` in your app directory and your web app will be served with
6
- ` gin ` as a proxy. ` gin ` will automatically recompile your code when it
7
- detects a change. Your app will be restarted the next time it receives an
4
+ ` gin ` is a simple command line utility for live-reloading Go web applications.
5
+ Just run ` gin ` in your app directory and your web app will be served with
6
+ ` gin ` as a proxy. ` gin ` will automatically recompile your code when it
7
+ detects a change. Your app will be restarted the next time it receives an
8
8
HTTP request.
9
9
10
- ` gin ` adheres to the "silence is golden" principle, so it will only complain
10
+ ` gin ` adheres to the "silence is golden" principle, so it will only complain
11
11
if there was a compiler error or if you succesfully compile after an error.
12
12
13
13
## Installation
14
14
15
- Assuming you have a working Go environment and ` GOPATH/bin ` is in your
15
+ Assuming you have a working Go environment and ` GOPATH/bin ` is in your
16
16
` PATH ` , ` gin ` is a breeze to install:
17
17
18
18
``` shell
@@ -24,7 +24,7 @@ Then verify that `gin` was installed correctly:
24
24
``` shell
25
25
gin -h
26
26
```
27
- ## Basic usage
27
+ ## Basic usage
28
28
``` shell
29
29
gin run main.go
30
30
```
@@ -43,18 +43,19 @@ Options
43
43
--buildArgs value Additional go build arguments
44
44
--certFile value TLS Certificate
45
45
--keyFile value TLS Certificate Key
46
+ --logPrefix value Setup custom log prefix
46
47
--help, -h show help
47
48
--version, -v print the version
48
49
```
49
50
50
51
## Supporting Gin in Your Web app
51
- ` gin ` assumes that your web app binds itself to the ` PORT ` environment
52
- variable so it can properly proxy requests to your app. Web frameworks
53
- like [ Martini] ( http://github.com/codegangsta/martini ) do this out of
52
+ ` gin ` assumes that your web app binds itself to the ` PORT ` environment
53
+ variable so it can properly proxy requests to your app. Web frameworks
54
+ like [ Martini] ( http://github.com/codegangsta/martini ) do this out of
54
55
the box.
55
56
56
57
## Using flags?
57
58
When you normally start your server with [ flags] ( https://godoc.org/flag )
58
- if you want to override any of them when running ` gin ` we suggest you
59
+ if you want to override any of them when running ` gin ` we suggest you
59
60
instead use [ github.com/namsral/flag] ( https://github.com/namsral/flag )
60
61
as explained in [ this post] ( http://stackoverflow.com/questions/24873883/organizing-environment-variables-golang/28160665#28160665 )
0 commit comments