Skip to content

Instantly share code, notes, and snippets.

@bjesuiter
Last active August 16, 2024 14:52
Show Gist options
  • Save bjesuiter/7ad486562d75aa068c23a096670c28b3 to your computer and use it in GitHub Desktop.
Save bjesuiter/7ad486562d75aa068c23a096670c28b3 to your computer and use it in GitHub Desktop.
JB Tools

JB Tech Stacks

A List of all my tech-stacks and useful libraries

Deno

JS - Runtime Data Validation Libs

JS - Logging Libs

  • logdownjs - A simple logging framework working in node and browsers (and therefore also in deno)
    • Problem: Only CJS available (needs compat settings when compiling through tsc)
  • Rejected: pinojs Very small but usefull nodejs logging framework
  • NEW: roarr - Tested all popular libs before, wrote a better new one
    • a logger that I can use in an application code and in dependencies.
    • a logger that allows to correlate logs between the main application code and the dependency code.
    • a logger that works well with transports in external processes.

Node - Repo Management

  • knip Cleanup of unused dependencies

Node - Scripting for Dev Tasks in Repositories

  • concurrently - Running serve/watch tasks in parallel
    • with nice color coding of stdout and input handling!
  • dot-json - edit json files from cli for easy changes, for example versions in package.json
  • tsx - node.js runtime with extended esm and typescript support (replaced esno and esm for me)

Node - HTTP Webservers

2024-06-26: Replace all of them with vite + this plugin to list dir contents <3 :

Legacy

  • live-server - dev server with watch mode + cors
    • bje-2022-01-24: seems hacked or something, outputs gibberish on cli when executing
  • @web/dev-server - possible alternative to lite-server - VERY NICE!
    • Problem: does not support cors out of the box
    • Update: Does support cors, but only with a custom middleware
  • lite-server - sleek SPA webserver
    (from big OSS guy johnpapa, but seems only a small wrapper for url rewrite for SPAs to index.html)
  • http-server - simple static web server (great for serving WebComponent bundles from local node_modules)

Tip: How to optimize Express Server in Production:
http://expressjs.com/en/advanced/best-practice-performance.html#proxy

Node/NPM - Library Publishing

Node/Bun CLI Tools

Deno - HTTP Webserver

  • Simple Deno file_server
    Install with deno install --allow-net --allow-read -n serve https://deno.land/std/http/file_server.ts Available for node with: npm i -D deno-file-server

    Options:

    USAGE:
      file_server [path] [options]
    
    OPTIONS:
      -h, --help          Prints help information
      -p, --port <PORT>   Set port
      --cors              Enable CORS via the "Access-Control-Allow-Origin" header
      --host     <HOST>   Hostname (default is 0.0.0.0)
      -c, --cert <FILE>   TLS certificate file (enables TLS)
      -k, --key  <FILE>   TLS key file (enables TLS)
      --no-dir-listing    Disable directory listing
      --no-dotfiles       Do not show dotfiles
      -v, --verbose       Print request level logs
    

Bun - ServerSide Web Framework

  • ElysiaJS - sieht extrem gut aus, mit Plugins für Lucia Auth, Websockets, Swagger, TRPC
    • Works in any runtime - Node.js, Bun, Deno, Cloudflare Workers
    • Extensive database support out of the box

TS - Auth

Prod - HTTP Webserver

Caution: Use nginx for serving static files in production in a docker container!
https://stackoverflow.com/questions/44796056/whats-the-better-approach-serving-static-files-with-express-or-nginx

Desktop Apps with WebTech

SaaS Databases

  • Fauna DB - cursom query language - not recommended

Assets for Webdev (Icons, etc.)

  • Heroicons - Free, MIT licensed high quality SVG icons (from Tailwind guys)
  • Heropatterns - Free, MIT licensed SVG patterns (from Tailwind guys)

Hosting

JB Tools

A List of all my go-to tools for certain tasks

Shell Config

  • Prompt: starship (because it's in Rust => much faster!)
    Previous: sindresorhus-pure-prompt

Diagramming

Code Snippet Management

Current GoTo Solution: http://gist.github.com/

Dev Environment

Tooling Ideas

Ideas for new tooling to check out

INFO: Merged with jb-tools.md and jb-tech-stacks.md to avoid duplicating categories and have similar tools at the same place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment