Fork me on GitHub
#nbb
<
2022-11-03
>
Erkan18:11:35

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

borkdude18:11:46

@hallstrom.eric Yes:

(ns example)

(defn foo [] "Hello")

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

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

foo()

Erkan18:11:31

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

🎉 1
partyparrot 1