Fork me on GitHub
#clojurescript
<
2017-08-27
>
motoom10:08:42

Is it possible to have an entire web stack (nginx <-> webserver <-> webbapp <-> databaseconnector) entirely in ClojureScript without having the need to install Java?

Chris Bidler13:08:11

@motoom I don’t know for sure, but I would say that the first thing I’d think “oh, no, that’s not a thing in pure Javascript” would be a database connection driver. Now, if your data storage exposes a REST or GraphQL API for CRUD operations then you might be in business, but if you’re planning to talk directly to some SQL DB, I suspect your’e not going to find JS implementations for that.

Chris Bidler13:08:55

though it appears this is an area where my knowledge is simply outdated - assuming you can/do target node for your backend runtime: https://www.npmjs.com/package/pg https://www.npmjs.com/package/mysql

noisesmith14:08:09

@motoom do consider that the jvm will perform better, if time / CPU / RAM matter it's a better choice

noisesmith14:08:21

but yeah, there's self hosting cljs on node (lumo)

motoom14:08:33

@noisesmith Yup, I've lumo installed on my computer. I was just wondering if I can use it to implement a web application without any dependencies on the JVM or tools that need the JVM. I understand that if Lumo runs under Node, it can just use express and other goodies from that ecosystem?

motoom14:08:42

@chris_johnson Thanks I'll check out those database connectors.

Chris Bidler14:08:48

yeah, I will too hehe. Thanks for asking a question that got me to accidentally teach myself something I didn’t know!

noisesmith14:08:25

@motoom right, yes that works, but just be aware you could get more done with less hardware if you used the jvm, that's all.

coetry16:08:48

is that an illegal function definition?

coetry16:08:12

I’m getting Invalid number format [3-col-grid-container] from figwheel

noisesmith16:08:45

yeah, that's not a valid name

coetry16:08:52

which part is invalid

coetry16:08:55

the 3 in the beginning?

coetry16:08:05

gotcha, so no numbers in symbol names

noisesmith16:08:12

you could make it -3...

noisesmith16:08:18

it just can't lead with a number

coetry16:08:21

gotcha, thanks

noisesmith16:08:14

oh wait, not -3... but _3.. would work, heh