nbb

Erkan 2022-11-03T18:21:35.934589Z

Heyo! Is there a way to import a nbb script in a node file and run a function defined the nbb file?

borkdude 2022-11-03T18:22:46.387639Z

@hallstrom.eric Yes:

(ns example)

(defn foo [] "Hello")

#js {:foo foo}
JS:
import { loadFile } from 'nbb'

const { foo } = loadFile('example.cljs')

foo()

Erkan 2022-11-03T18:23:31.715169Z

this is just amazing; then you can run clojure on vercel!!

1
🎉 1