Newer
Older
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
# Cicer
Cicer is a web based software to manage the stock, purchases and balance of a consumer association. It has being created for the needs of the [Garbanzo Negro](http://garbanzonegro.org).
## deploy it
Build a copy using make:
```
$ make build
```
Create a secret for the authentication tokens:
```
$ head -c 21 < /dev/urandom | base64
```
Now you can copy the build folder and the cicer binary to your server and run it like:
```
$ ./cicer -assets 'path/to/build' -secret 'scret' -addr ':8000'
```
Instead of flags all the params can be passed as env variables see the names between `{` and `}` in:
```
$ ./cicer -h
```
## run for development
To run it in develop mode build and run the backend:
```
$ go build
$ ./cicer
```
And run the frontend with npm:
```
$ npm start
```
This will open a browser pointing to `http://localhost:3000` where you will see any changes you do in the javascript side (the backend side needs recompilation).
## Initialize data
When you run cicer it will print an authentication token that we can use to set up some initial data, see `setup.sh`:
```
$ ./setup.sh the.hexadecimal.token
```