---
title: "Vanilla with Candy Sprinkles"
description: "Vanilla with Candy Sprinkles presents a baseline full-stack Node.js application: a stateful visitor counter that increments across refreshes, tabs, browsers, and machines. The post starts with a dependency-free package.json and a 72-line server.js, then uses node-demo to generate variants with ECMAScript modules, EJS or Mustache templates, and Express. It adds SQLite3 or PostgreSQL for persistence, Tailwind CSS and TypeScript with a build step, and Drizzle, Knex, or Prisma as ORM options, noting differing language and build requirements. WebSockets provide real-time updates, htmx can handle client-side connection and DOM work, and Redis coordinates notifications across multiple servers; Fly.io deployment can scale the setup across eight instances in four regions. The concluding section points to further alternatives, including React, Angular, Lit, SolidJS, Svelte, Vue, esbuild, rollup, and other deployment targets, while inviting alternate implementations."
---

# Vanilla with Candy Sprinkles

[Fly.io](https://yomu.fyi/company/fly-io) · May 18, 2023

**Type:** Tutorial

## Summary

Vanilla with Candy Sprinkles presents a baseline full-stack Node.js application: a stateful visitor counter that increments across refreshes, tabs, browsers, and machines. The post starts with a dependency-free package.json and a 72-line server.js, then uses node-demo to generate variants with ECMAScript modules, EJS or Mustache templates, and Express. It adds SQLite3 or PostgreSQL for persistence, Tailwind CSS and TypeScript with a build step, and Drizzle, Knex, or Prisma as ORM options, noting differing language and build requirements. WebSockets provide real-time updates, htmx can handle client-side connection and DOM work, and Redis coordinates notifications across multiple servers; Fly.io deployment can scale the setup across eight instances in four regions. The concluding section points to further alternatives, including React, Angular, Lit, SolidJS, Svelte, Vue, esbuild, rollup, and other deployment targets, while inviting alternate implementations.

## Context

The post defines a small full-stack baseline as a learning example, a starting point for selectively combining tools, and a debugging aid for larger systems. Its initial target is a stateful web server with a visitor counter, with eventual goals of real-time updates and global deployment.

## Approach / What changed

It builds the counter with Node.js, then shows node-demo commands for swapping modules, template engines, Express, databases, CSS and typing tools, ORMs, WebSockets, htmx, Redis, and package managers. It also provides local and Fly.io launch instructions, including scaling across regions.

## Takeaways

- The baseline application uses a dependency-free package.json, a 72-line server.js, and a counter persisted initially in a text file.
- SQLite3 is presented as suitable for development, while PostgreSQL is described as the current best production choice; LiteFS is mentioned for SQLite3 deployment.
- WebSockets enable updates between clients, while Redis addresses the limitation that multiple servers otherwise maintain separate WebSocket pools.

**Tags:** [Node.js](https://yomu.fyi/topic/node-js), [Postgres](https://yomu.fyi/topic/postgres), [Redis](https://yomu.fyi/topic/redis), [WebSockets](https://yomu.fyi/topic/websockets)

- Source: [Fly.io](https://fly.io/blog/vanilla-candy-sprinkles)
- Source URL: https://fly.io/blog/vanilla-candy-sprinkles
- Ingested by Yomu: 2026-09-03T01:24:22.348Z

[Read original post](https://fly.io/blog/vanilla-candy-sprinkles)
