Fork me on GitHub
#nbb
<
2023-10-24
>
sher09:10:03

Submitted a PR extending fastify server example, please take a look https://github.com/babashka/nbb/pull/340

borkdude09:10:12

I am trying the example, what is the login password? 😆

borkdude09:10:21

maybe make this more obvious in the README?

sher09:10:24

Should mention it in README or the Login page.

borkdude09:10:36

also just user / password (simpler) would be good enough

sher09:10:23

Will update the details and ask for your review later.

sher09:10:40

Remaining task: • add endpoint tests • RBAC using casbin

sher09:10:45

Found it out the hard way that #js is not recursive, for deep-tree objects. applied-science/js-interop is very helpful. But one have to be careful of what data structure is being passed as argument.

delaguardo09:10:46

clj->js is recursive as well

borkdude09:10:23

In #C03U8L2NXNC all of this is a lot easier since everything is just a JS object ;)

👀 1
sher10:10:38

squint has compile command to see what JavaScript code it generates. Nice.

sher10:10:04

Maybe an uninformed question, but, why would one choose squint over nbb for writing a backend service (e.g.: using fastify etc.)? Is nbb purposed for scripting, but squint provides full interop with JavaScript?

borkdude10:10:12

Not just to see, it is the code that JS will execute

borkdude10:10:34

@URCRY0U87 squint is still in development so it's a bit experimental, but I would encourage everyone to try it to make progress in improving it. the REPL experience isn't as good as nbb right now, no nREPL, but this is something I'm working on

borkdude10:10:54

but using vite or bun, the watch functionality is very convenient

borkdude10:10:07

squint watch watches your :paths that are described in squint.edn

borkdude10:10:19

you can see this in action in squint/examples/vite-react

sher10:10:44

Great, will try to re-create the same backend service on squint . What nbb lacked is the compile step, where the developer could investigate the output JavaScript for debugging purposes. Is it a correct assumtion (analogy)? a) TypeScript -> (bun/tsc/esbuild) -> JavaScript b) ClojureScript -> squint -> JavaScript

sher11:10:52

Would like to be helpful in squint progress on JS side. Not much use of me as Clojure dev (yet).