Transforming a js project into a clojurescript project

Hello @eternalNewbie.

To inline the xml into the client side code like you are doing you should use rc/inline like this:

(ns demo.app
  (:require [shadow.resource :as rc]
            ["xml2js" :as xml2js]))

(def domaines-xml (xml2js/Parser (rc/inline "data/domaines.xml")))

Note that you should put the file on the classpath e.g. in src/data/domaines.xml if you use this method.

See this post for more details.

If you want to use express.js on your backend might I recommend Sitefox which is a ClojureScript backend framework I built specifically for this. It is built on top of express. You can bootstrap a new project like this:

npm init sitefox-shadow-fullstack myproject

Let me know if I can help in any way.

1 Like