Coder Social home page Coder Social logo

neurokid / netlify-cljs-template-lambda Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thheller/netlify-cljs

0.0 0.0 0.0 52 KB

demo frontend+function deployed to netlify written by thheller

Home Page: https://confident-goldwasser-1f7161.netlify.com/

Clojure 72.77% HTML 27.23%

netlify-cljs-template-lambda's Introduction

netlify-cljs

Test project using shadow-cljs to deploy using netlify automatic deploys via github.

Currently deployed to: https://confident-goldwasser-1f7161.netlify.com/

During development, start shadow-cljs in server mode and either use http://localhost:9630 to control builds or use additional terminals.

npm install
npx shadow-cljs server

Backend only really supports compile/release. watch is probably not gonna be all that reliable, didn't look further into it yet. The netlify-lambda util probably needs to be restarted when the lambda code is recompiled.

# different terminal
npx shadow-cljs compile lambda
npx netlify-lambda serve functions

Frontend can be development like normal. The built-in dev http server will proxy the function request to the running netlify-lambda process.

# different terminal
npx shadow-cljs watch frontend
open http://localhost:6500

Notes

Everything builds fine on its own but netlify currently only caches .m2 dependencies if a project.clj or build.boot file is found. We can work without cache but it makes the builds a bit slower if all the deps downloaded each time.

There doesn't seem to be a way to tell netlify to cache .shadow-cljs/builds so incremental builds are not supported and everything will always recompile from scratch. A typical deploy on this very simple project takes about 2 minutes.

netlify-cljs-template-lambda's People

Contributors

thheller avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.