nbb 2023-10-24

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

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

maybe make this more obvious in the README?

Should mention it in README or the Login page.

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

Will update the details and ask for your review later.

Remaining task: • add endpoint tests • RBAC using casbin

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.

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

clj->js is recursive as well

👍 1

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

👍 2
👀 2

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

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?

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

@sherzod 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

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

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

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

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