Deploying a shadow-cljs project - very new to web development

I am very new to web development and have found developing with clojurescript/shadow-cljs wonderful. I have followed an awesome workshop that helped me learn a lot! I have completed both parts, and now want to deploy the project to github pages or heroku so I know how to complete the cycle but am at a loss about how to go about it.

I have run npx shadow-cljs release app and it generated an app.js and manifest.edn, but I am not sure what to do with them. I know that I have a huge knowledge gap when it comes to web development but I am hoping that someone will point me in the right direction to fix that.

Thanks!

1 Like

Hi! I’m happy to walk through the way I do it. If your app is all client-side then GitHub Pages is a great choice.

  1. Set up the repo on GitHub, if you have not already. Initialize a new repository in your local project folder to match, making sure to set the remote as instructed.

  2. Go to Settings and enable GitHub Pages by setting the source directory to master.

  3. Find your index.html that serves your app.js and copy it into your project root. Edit it so that it will find that (and any css/assets you may have) by making absolute paths like /my-project/public/app.js.

Here’s one I did if you’d like to see an example.

3 Likes

Thanks! I thought I had another problem but I was just stepping on my own toes. The project now is on pages!

Netlify.com is pretty nice for frontend projects. Just create a new site and upload the public folder.

1 Like

I had read the name Netlify before but didn’t look into it. It looks awesome. I am planning to make a personal site next and that just might be where I host it! Thanks :smiley:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.