Mercurial > gemma
annotate docs/DEVELOPMENT.md @ 4429:1cb570c69b63
docs: add hint how to use hg serve
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Wed, 18 Sep 2019 16:25:20 +0200 |
parents | b195bc79e3e8 |
children | aaab0ebde623 |
rev | line source |
---|---|
291
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 # Development |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
4429
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
3 # View source code history |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
4 |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
5 If you want to see the source code structure and history |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
6 on our local machine (instead of online): |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
7 `hg serve` |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
8 from Mercurial SCM will start a local server. Install the |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
9 [HighlightExtension](https://www.mercurial-scm.org/wiki/HighlightExtension) |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
10 to enable syntax highlighting. |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
11 |
1cb570c69b63
docs: add hint how to use hg serve
Bernhard Reiter <bernhard@intevation.de>
parents:
4427
diff
changeset
|
12 |
291
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 ## Backend |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 You need a working [Go](https://golang.org/dl) build environment (1.10+). |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 * Install dependencies |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
19 `sh 3rdpartylibs` |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 * Build |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 Prerequesite: compile server |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 ``` |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 cd cmd/gemma/ |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 go build |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 cd ../../ |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 ``` |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 * Run |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 Run server with `./cmd/gemma/gemma` |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 |
4427
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
33 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
34 ### View source code documentation interactively |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
35 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
36 Use https://godoc.org/golang.org/x/tools/cmd/godoc |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
37 (coming with package `golang-golang-x-tools` on Ubuntu.) |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
38 to see the formatted documentation. |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
39 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
40 Started in the top level directory like |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
41 `godoc -http=:6060` |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
42 you can access the documentation at |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
43 `http://localhost:6060/pkg/gemma.intevation.de/?m=all` |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
44 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
45 Hints: |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
46 * A parameter like `-goroot /usr/lib/go-1.12` may avoid warnings, if |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
47 the goroot is somewhere else. |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
48 * Clicking on a function declaration header will take you to the source |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
49 code. (Or changing `?m=all` to `?m=src?`). |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
50 |
b195bc79e3e8
docs: add hints for starting godoc
Bernhard Reiter <bernhard@intevation.de>
parents:
291
diff
changeset
|
51 |
291
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 ## Client |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 |
9d6ba97a31d2
Moved development infos to separate file.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 See [client/README](../client/README.md) for details. |