mpdroog / invoiced

Simple hour registration + invoice generator.
BSD 2-Clause "Simplified" License
13 stars 5 forks source link

what configurations are necessary to run invoiced locally? #9

Closed awm086 closed 5 years ago

awm086 commented 5 years ago

I tried to follow the documentation and got this

 go go get github.com/mpdroog/invoiced

➜  go cd $GOPATH/src/github.com/mpdroog/invoiced 
➜  invoiced git:(master) go build 
➜  invoiced git:(master) ./invoiced -v
2018/11/14 18:15:54 Curdir=/Users/ali/go/src/github.com/mpdroog/invoiced
2018/11/14 18:15:54 DB=billingdb
2018/11/14 18:15:54 open ./config.toml: no such file or directory
➜  invoiced git:(master) 
mpdroog commented 5 years ago

Ahh I forgot to add an example config.toml https://github.com/mpdroog/invoiced/blob/033232d83c540cb18f6cfe98c473f5a3436c18e1/config.example.toml

mpdroog commented 5 years ago

Considering it closed.

awm086 commented 5 years ago

@mpdroog coming back here while trying to give it another try I am getting this now:

./invoiced -d ~/billingdb 

panic: reference not found 

I created the directory ~/billingdb

And I cannot figure out why this is happening.
go version go1.13.1 darwin/amd64

So perhaps the readme needs update as what should one do if s/he wants to run this locally. i.e.

  1. Create required filesystem ... i.e. ~/billingdb
  2. pass the path to the db is ./invoiced -d ~/billingdb 3 .. other information
mpdroog commented 5 years ago

Great you want to give invoiced a second try :) I have to admit, I hacked it together to get myself a distributed billing system and the 'rough edges' I've never shaved off (lack of time)

If you want to try, I've updated the README that shows what to do (just tested it manually)

awm086 commented 5 years ago

Thanks, tried it again and it works but I cannot login. What are the correct credentials? I see multiple references for users in config.toml and in billingdb entities.toml ... I am hoping to use this as a learning project and perhaps I can contribute back with your help .

Update: after going through the instructions again it seems that one must commit whatever is in billingdb before building/running. The credentials salt and hash must be in the git index it seems. So now I have that working but it seems the app is missing some compiled JS anf assets such as app.js. I keep getting a 404 for them

mpdroog commented 5 years ago

What are the correct credentials?

The email from entities.json and the password you gave to contrib/gen/gen. (If you run contrib/gen/gen it will ask you for a password and then generate an IV, Salt and Hash you can enter in entities.json

! Be careful to commit everything before starting invoiced (it reverts any git pending files on start in the billingdb-folder)

Update: after going through the instructions again it seems that one must commit whatever is in billingdb before building/running.

Correct

it seems the app is missing some compiled JS anf assets such as app.js

If you're missing app.js I guess you didn't run the first build step?

cd static-src
yarn install
npm run dev