Skip to content
Snippets Groups Projects
Forked from meskio / cicer
209 commits behind the upstream repository.
README 1.11 KiB
# 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
```