This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-21
Channels
- # announcements (1)
- # babashka (66)
- # beginners (37)
- # calva (3)
- # cljdoc (2)
- # clojure (14)
- # clojure-australia (6)
- # clojure-doc (4)
- # clojure-europe (22)
- # clojurescript (9)
- # datalevin (5)
- # datomic (4)
- # emacs (5)
- # events (1)
- # figwheel-main (6)
- # graalvm (41)
- # lsp (16)
- # luminus (1)
- # off-topic (2)
- # overtone (2)
- # re-frame (2)
- # reagent (8)
- # remote-jobs (1)
- # reveal (49)
- # shadow-cljs (9)
- # spacemacs (14)
- # tools-build (4)
- # tools-deps (16)
If I have postgres running on this server, is it possible, in a cljs program running on the same server to connect directly to that postgres db? I assumed it would be straightforward using some well established node library but I can't find any examples. I'm not familiar with the node ecosystem.
I wanted to do some oz/vega-lite demos and pull the data straight from the db. In prod I would get this data via REST api.
I am having problems with some require statements. I am using shadow-cljs and I am trying to use this package: https://www.npmjs.com/package/qrcode I have translated this code:
var QRCode = require('qrcode')
QRCode.toDataURL('I am a pony!', function (err, url) {
console.log(url)
})
to
(:require ["qrcode" :as qrcode]
[clojure.string :as str])
...
(qrcode/toDataUrl (str/join \newline epc) (fn [err url] (println url)))
but it seems toDataUrl is nil. What am I doing wrong?the source seems to have this line:
exports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)
hm it works now…
thanks anyway
I think I misspelled something