This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-26
Channels
- # asami (3)
- # babashka (3)
- # beginners (45)
- # boot (3)
- # calva (6)
- # clojure (26)
- # clojure-dev (16)
- # clojure-europe (15)
- # clojure-norway (6)
- # clojure-uk (6)
- # clojurescript (34)
- # community-development (4)
- # conjure (3)
- # datascript (4)
- # datomic (4)
- # emacs (21)
- # events (1)
- # fulcro (16)
- # graalvm (5)
- # jackdaw (1)
- # kaocha (5)
- # lsp (74)
- # malli (8)
- # nbb (37)
- # off-topic (50)
- # pathom (5)
- # reagent (19)
- # ring (1)
- # shadow-cljs (60)
- # sql (3)
Hi guys, I'm looking for a way to do OAuth2 authentication and HTTP requests with nbb. What would you say is the most straightforward way to do this? I'm currently thinking about wrapping axios and axios-oauth-client, but I would like to know if there isn't a better way.
There isn't an nbb-specific way to do it, so in this case, do whatever works best on Node.js. Perhaps someone in this channel has experience with that
Hmm @roseneck I see that sitefox, a web "framework" compatible with nbb, does have some oauth stuff: https://github.com/chr15m/sitefox/blob/main/README.md and it mentions the https://www.passportjs.org/ library
Thanks a lot, I'll check it out! 🙂
just wanna say: nbb is great! I needed to use the source-map
JS package in a script and nbb let me whip it up in no time with the help of Clojure's core library. Very impressive work!
I remember trying to use lumo for similar type of stuff years ago and doing anything other than running a single file was a huge pain, installing it was a pain, just a lot of rough edges. a lot of thought and work has gone into bb and nbb to allow a whole slew of use cases that were previously unavailable to the clojure ecosystem. 👏:skin-tone-2:
What I'm also excited about is that nbb will not only work on Node.js but also on bun and bun has great FFI support, which again will open up new possibilities
@lilactown Note that when you do bun nbb ...
it won't run bun, but still Node.js due to the shebang in the nbb startup .js script. I've requested in the bun discord if this could be changed and they are considering it but right now you'll need a run.mjs
wrapper which calls loadFile
from the nbb package
it's similar to other CLIs you invoke in bun, they did this on purpose because the Node.js compatibility isn't fully mature yet
I would prefer nbb to just run on bun and maintain just one codebase. Currently you can do it the way it's documented above
bun is very early days and experimental, it's probably better to wait for them to fix the Node.js compatibility, it's one of their priorities
idk how this guy was able to work on this for year(s). very curious if he's received funding or bootstrapped. I see he's a thiel fellow. makes me wonder where he intends to take the project w.r.t. funding in the future, e.g. go the VC route like deno did.
would probably change how I interacted with the project if I knew he had a corporate backer vs. VC vs. OSS community funding 🙂
@lilactown He was teasing on Twitter that some important new will come in the near future
How should I include clojurescript dependencies in an nbb project? Is there a guide?
I see a discussion in the README about classpath but that doesn't actually address how to specify the libs (like in lein deps)
@sirwobin It depends which dependency. If you use git deps then you can use them directly like so:
nbb --classpath $(clojure -Spath)
but nbb can't currently read dependencies from .jar files. However, there is a workaround for that here:
https://github.com/babashka/nbb/blob/main/doc/dependencies.md
There is a PR to improve this, but still need to look at this