stevekrouse
mayor of val town
Likes
452
TodoApp
@stevekrouse
HTTP (deprecated)
SSR React Mini & SQLite Todo App This Todo App is server rendered and client-hydrated React. This architecture is a lightweight alternative to NextJS, RemixJS, or other React metaframeworks with no compile or build step. The data is saved server-side in Val Town SQLite . SSR React Mini Framework This "framework" is currently 44 lines of code, so it's obviously not a true replacement for NextJS or Remix. The trick is client-side importing the React component that you're server rendering . Val Town is uniquely suited for this trick because it both runs your code server-side and exposes vals as modules importable by the browser. The tricky part is making sure that server-only code doesn't run on the client and vice-versa. For example, because this val colocates the server-side loader and action with the React component we have to be careful to do all server-only imports (ie sqlite) dynamically inside the loader and action , so they only run server-side.
miniWidget
@wilt
HTTP (deprecated)
Did you know that in recent versions of Windows 11, PWAs can add themselves as desktop widgets? This is a demo of that. Because this PWA isn't published to the Microsoft Store, if you want to try this out for yourself you'll first need to install WinAppSDK version >= 1.2 , enable Developer Mode in settings following the instructions here , and visit https://wilt-miniWidget.web.val.run to install using a recent version of Edge.
retroVisitCounter
@maxm
HTTP (deprecated)
Retro Visit Counter You are visitor number: How special! Want a retro visitor counter for your myspace page or geocities website? Fork this val and add the image link to your website: <img src="https://maxm-retrovisitcounter.web.val.run/counter.png">
<!-- Make sure you swap this subdomain out with the subdomain of your forked val -->
<img src="https://[CHANGE ME!].web.val.run/counter.png">
readMediumPosts
@patrick_kw_chiu
Script
Demo of mongo-http NPM package Great for serverless apps that can only use HTTP or have a hard time persisting database connection See more at the Git Repo and the Medium tutorial ! What this demo does: Read the latest Chinese Medium posts with categories "javascript" or "typescript"