Fork me on GitHub
#nbb
<
2023-02-24
>
Paco02:02:42

Created a nifty lambda API proxy example with nbb + ruuter + axios https://gist.github.com/kidpollo/e309c1eb47d859f1975263d097aa9185

🎉 6
Asko Nōmm21:02:04

This is awesome!

Paco02:02:15

Oh damn does not work on a lambda because nbb.deps requires babashka? Am I correct @borkdude?

Paco02:02:24

nvm if i Include the .nbb folder it works

Paco02:02:54

OMG womp wopm the bundle is sooooo big!

borkdude16:02:09

You can throw out the .jar file btw

Paco02:02:11

there is no optimization or bundling in nbb correct?

Paco03:02:51

phew!

{:paths ["src"]
 :deps {org.clojars.askonomm/ruuter {:mvn/version "1.3.2"
                                     :exclusions [org.clojure/clojure
                                                  org.clojure/clojurescript]}}}

🙌 2
borkdude16:02:47

We should ask @U01DUT900TZ to exclude clojurescript from this dependency, it should only be included for testing in an alias

Asko Nōmm21:02:59

I'll add it to my todos and do it first chance I get 🙂

❤️ 2
Paco03:02:56

^ does the trick

borkdude20:02:33

This is pretty cool :) Deno 1.31 now supports more Node.js stuff and you can run an nbb script directly from a git url:

import { loadString } from 'npm:[email protected]'

await loadString(`(prn (+ 1 2 3))`);
$ deno run -A 
6

borkdude20:02:35

This also works:

deno run -A npm:nbb nrepl-server
nREPL server started on port 57302 on host 127.0.0.1 - 

borkdude20:02:32

nREPL-ing from deno!

🙌 8
😎 15