Wire up ClojureScript SPA to Clojure backend (part 1)
on the code again
Allan and I cover how you could go about creating a backend to your existing front-end project using Clojure 🥷🏽. The edit on this one may be a bit choppy, because it was cut down a fair bit :p
Start Repo: https://github.com/danownsthisspace/crux-db-front-end
Libraries Used:
Server: https://github.com/clj-commons/aleph Routing: https://www.metosin.fi/blog/reitit/ Content Negotiation: https://github.com/metosin/muuntaja Mount: https://github.com/tolitius/mount/blob/master/doc/clojurescript.md Crux Database: https://github.com/juxt/crux
00:07 Show front end 00:30 Intro 00:57 Create Deps.edn 03:20 Create src folder and start REPL 03:55 Serve static assets through webserver 07:00 Setup Mount 11:42 Serve index.html 14:16 Serve Assets 16:37 Create create/article endpoint 24:10 Store article in Crux DB 32:00 Return articles from the server ... https://www.youtube.com/watch?v=6jvG3XbSeos
247099789 Bytes