Fork me on GitHub
#biff
<
2023-03-04
>
loganrios03:03:51

Something perhaps non-intuitive: it seems like you can't/shouldn't wrap the exported environment variables in secrets.env with quotes? Upon running bb dev, I kept getting Base64 encoding errors thrown to the console every time I tried to access any route on localhost. I had assumed that the secrets.env file was just some generic shell script that happened to get run, but it's actually both slurp'd/parsed by Biff and sourced in the shell prior to any run-cmd. Granted, I don't think any API-key-secret-anything will or should ever contain must-be-string-escaped characters, but I had wrapped them just in case, and it took me a while to figure out why it wasn't working.

loganrios03:03:03

(I'm sure that this is not a bug, and is probably just my over-caution and lack of knowledge in this domain, but I figured it was worth asking and documenting in case someone else tried what I did)

Jacob O'Bryant03:03:35

ah yes, that env parsing stuff is a huge hack. the quotes should work in prod, just not in dev. I wouldn't mind finding a better way to do that

Jacob O'Bryant03:03:49

it's just a little awkward with bb tasks

loganrios03:03:37

Totally fine with the implementation, honestly was excited that config.edn could finally be committed and shared, so I rushed into upgrading without reading the source like I probably shoulda.

Jacob O'Bryant03:03:09

either need to stop using bb's clojure command and instead invoke clj as a regular subprocess, so that we can run a command that sources the env file and then runs clj (similar to what happens in prod); or we need to run a nested bb process... nah you didn't do anything wrong, it is just a legitimately rough edge

👍 2
loganrios03:03:13

Appreciate the help 🙂 I'm about eight hours into upgrading from 0.5.7 to 0.7.0, and juuuuuust about finished, save for a Malli exception that's now getting thrown when I'm testing signup. Very excited to use the new stuff.

Jacob O'Bryant03:03:13

woah, 8 hours is definitely more than I would have intended those upgrades to take haha

loganrios03:03:28

(acknowledging that 8hrs is probably ballooned by some other factors up to and including switching keyboard layouts and emacs config since I last touched this project)

🎅 2
loganrios03:03:39

The only semi-difficult part has been routing auth--I have a pretty-significant guest-user-facing component to my application, whereas Eelchat and the starter code only really deal with users who are already signed-in, so there was a little bit of translation necessary across domains.

loganrios03:03:23

I initially was intending to hack a more custom-routing thing to keep some backwards compatibility across other files, but it ended up requiring too much effort as opposed to "the auth plugin says I need to conform to these routes, so I'll just conform to those routes".

Jacob O'Bryant05:03:56

ah, well hope it wasn't too much trouble! I did decide to take a convention-over-configuration approach there

Jacob O'Bryant05:03:52

how do you handle guest users? Do you make a user doc + put a session cookie on them like usual, just without any ability to start a new session with an existing guest user? Do you "upgrade" guest sessions if they do some stuff as a guest and then sign in/sign up?

loganrios06:03:03

I'm embarrassed to admit that I currently do none of those things--but, granted, the only thing that Guests can really do is browse the database (for clarification, my project is nothing more than an aspiring "substack for web novels"). It's a looming problem, though--obviously authors will want some kind of analytics, and readers might want their progress saved before they sign up--so I'll be dealing with / implementing the doc + cookie approach sooner or later.

Jacob O'Bryant18:03:16

Has anyone who RSVPed to one of the previous biff meetups received spam from Meetup about taking over the Biff group? I closed it a while ago since I decided to focus on other things. But they've been relentless in sending me emails about a different group I was in that is also shutting down, trying to get someone to take over as the organizer so they can keep collecting the fee.

macrobartfast20:03:07

I didn’t get any. But maybe I never officially joined. What was the MeetUp name?

macrobartfast20:03:28

I may have watched them on YT or something.

Jacob O'Bryant20:03:37

excellent. maybe they only start if I officially step down as organizer. I emailed Meetup to have them delete the group before that happens; turns out they don't let you just do it from the site. what a dumb app http://meetup.com/biff-coding/ In the mean time I took it private and changed the name to "..................."

macrobartfast20:03:30

Ah, I guess I never joined. So I’m not a litmus.

Jacob O'Bryant20:03:53

well at least if anyone does get spammed about it in the future, the emails will be very funny

tbrooke16:03:32

I haven’t seen anything