These are chat archives for BVNK/bank

17th
Aug 2016
Kyle Redelinghuys
@ksred
Aug 17 2016 04:38
Ah those are the worst, glad you got it fixed though! The scripts you wrote are awesome, really sick. Could you do a PR when you are ready?
Assis Ngolo
@figassis
Aug 17 2016 06:35
Thanks! And Yeah, will do as soon as I'm on my pc
SuperManfred
@SuperManfred
Aug 17 2016 20:26
Hey @ksred thinking about what you said yesterday about react native, and to use react for web frontend, I'm keen to use bank-react and see what I can do with react-native-web https://github.com/necolas/react-native-web#why
can you commit your latest changes to bank-react and I'll see how goes working on bank-react-native-web
Kyle Redelinghuys
@ksred
Aug 17 2016 20:30
Hey! Awesome idea. Right now he build is breaking, but master should be good to work from, or the rename project branch.
I'm working on getting it fixed this week to get into TestFlight
SuperManfred
@SuperManfred
Aug 17 2016 20:50
ok, ill start with whats there :)
Assis Ngolo
@figassis
Aug 17 2016 20:50
@ksred, so I spent the day making some more changes to automate configuration loading and I just noticed you were thinking the same.
That was the main reason I closed the PR
basically, in configuration.go, we had configPath set to an absolute path, and we were also messing with the FQDN a lot, both in certs and in the server setup
You can take a look at thsi commit (PS. This is not the last one. I’ve already merged with your last one)
figassis/bank@0560b11
So, I added another key in config.json for the FQDN, which generateCerts.sh uses to create files sugh as bvnk.co.key and bvnk.co.pem
Kyle Redelinghuys
@ksred
Aug 17 2016 20:58
@figassis this is awesome! When you're ready make a PR and I'll move along the same lines you are. I'll hopefully be getting some backend work done by the weekend too, and what you've done makes the set up a lot nicer
Love the direction
Assis Ngolo
@figassis
Aug 17 2016 21:07

These config keys are also used to load the certs in httpApi and other places. keeps the user from having to change them everywhere.

Moreover, I came into another issue. If a user moves the bank binary to another path, they will lose access to the certs and config.json. The same will happen with "go install”.

Also, for those of us forking your repo, we have it in a path like GOPATH/src/github.com/figassis/bank but the import path remains github.com/bvnk/bank/config.json, so using that for configPath gets us in trouble.

What I did was allow the user to set their import path as an optional flag “./bank [-p path]”. If they leave the flag out, it does not affect anything, but I had to replace code in main.go to use flag.Arg(0) instead of os.Args1. That allows us to get the arguments without flags.

So now we can do things like move the bank binary anywhere in the system and run ./bank -p import_path http

This works even if the user does not have go installed :-)

Yup, doing it now
Assis Ngolo
@figassis
Aug 17 2016 21:28
Finally you’ll now need to "go get github.com/kardianos/osext”. I added that to the readme file