1. 19
  1.  

  2. 8

    It’s not true React/JSX but for small things this is also nice:

    import { html, render } from 'https://unpkg.com/htm/preact/standalone.module.js'
    

    https://github.com/developit/htm

    1. 2

      Exactly what I was looking for, I was going to use a Gist with a jsx template string processor, but that seems better, thanks for sharing!

    2. 2

      Datastation looks really interesting too… By the way. How does sql connectivity work - does the online version allow direct connection from browser to postgresql? That can’t work, without a (protocol) proxy, can it?

      1. 2

        Thanks! Here are the deets on the online environment: https://datastation.multiprocess.io/#online-environment.

        tldr; it has a limited set of functionality (including being restricted to in-memory SQL) so that you can try it out and get the feel for it before you download. These restrictions (the whole app being in-memory) means I can offer it for free to anyone to try it out forever. You can even use it on your work laptop since the data stays on your machine. (Well that applies to both the desktop version and the online version.)

        1. 2

          OK, thanks. I guess I’ll have to try the desktop version, as I’d be most interested in accessing postgresql bases.

          1. 2

            Makes sense! The desktop version is fully featured.

      2. 1

        Nice. Small typo, the last “body.js” should be “app.js”, I believe.

        1. 2

          Good catch! index.jsx (and they were all supposed to be .jsx to make esbuild happy without further config).

          1. 1

            Really appreciate this as I’m trying to wrap my head around modern front-end - and get frustrated with tutorials that have a gig of dependencies just to get off the ground… Only problem is no typescript support in browsers (yet) -maybe deno will blaze way…

            Btw, I would probably prefer a “js” (or static binary) webserver to python -as the rest of the article has no extra dependencies (eg: a windows (js/ts) developer might not have python).

            So either:

            npx http-server . -p 8080
            

            https://github.com/http-party/http-server

            Or:

            caddy file-server
            

            https://caddyserver.com/

            Or, for those that are deno-curious: https://deno.land/manual/examples/file_server

            (nothing against python - but if node is already available…)

            1. 3

              Ah I figured even Windows has Python by default now but they only have an alias that leads you to the app store: https://devblogs.microsoft.com/python/python-in-the-windows-10-may-2019-update/.

              In any case, whatever web server you’d like to use is totally fine!