Snapwake

DocsDeploying

Supported frameworks

When you deploy a folder without a Dockerfile (or with one, if Snapwake recognizes the framework), Snapwake works out how to build and start it. This page lists what it looks for. If your app isn't covered, add a Dockerfile, or give the start command yourself with --start "..." or command = "..." in snapwake.toml.

How your app must listen

A framework-built app must listen on the port in the PORT environment variable. It is 3000. Snapwake ignores PORT and HOSTNAME if you set them in your env file. Apps built from a Dockerfile or an image choose their own port instead; see Which port.

Node.js

Snapwake treats a folder as a Node.js app when it has a package.json or a server.js.

Node.js version. The first of: engines.node in package.json, .nvmrc, .node-version, FROM node:N in a Dockerfile. Without any of these, Node.js 24 LTS. Only the major version is read.

Dependencies are installed during the build. node_modules from your machine is never uploaded.

Framework Detected by Build Start
Next.js next in dependencies, or a next.config.* file next build with output: "standalone" (added to a copy of your config if missing) node server.js from the standalone output
Medusa @medusajs/medusa medusa build; src/assets is copied along medusa db:migrate && medusa db:sync-links, then medusa start (or web: from a Procfile)
NestJS @nestjs/core npm run build, or nest build web: from a Procfile, else start:prod, else node dist/main
Express, Fastify, Hono, Koa the package in dependencies npm run build if there is a build script see "Start command" below
Static site Vite, Astro, Parcel, Vue CLI, Create React App or SvelteKit's static adapter, and no server of its own npm run build a built-in static file server
Any other Node.js app package.json npm run build if there is a build script see "Start command" below

Start command for Express, Fastify, Hono, Koa and plain Node.js apps, the first that exists:

  1. --start or command in snapwake.toml;
  2. the web: line of a Procfile;
  3. the start script in package.json;
  4. the file in main in package.json, then server.js, index.js, app.js, main.js, dist/index.js, dist/server.js, build/index.js, run with node.

If the start command looks like a development server (nodemon, ts-node-dev, next dev, vite without preview), the build prints a warning. It still deploys, but a dev server is slow to wake and uses more memory.

Static sites. The output folder is dist (build for Create React App, or outDir from vite.config.*). The built-in server sends index.html for unknown paths without a file extension, so client-side routers work. Files with hashed names are cached for a year; HTML is not cached. A folder with only an index.html and no package.json is served as it is.

MCP servers. Snapwake recognizes apps that depend on @modelcontextprotocol/sdk and can warm /mcp with an MCP initialize and tools/list before taking the snapshot, so the first real call after a wake is fast. Deploys from the CLI don't do this yet: they warm / only.

Python

Snapwake treats a folder as a Python app when it has requirements.txt, pyproject.toml, server.py or manage.py (and no package.json). Dependencies come from requirements.txt or pyproject.toml.

Framework Detected by Start
Procfile a web: line that command
Django manage.py gunicorn <project>.wsgi if gunicorn is in your requirements, else manage.py runserver --noreload
FastAPI fastapi in requirements, and app = FastAPI(...) in main.py, app.py, api.py, server.py, app/main.py or src/main.py uvicorn <module>:<app>
Flask flask in requirements, and app = Flask(...) in one of the same files gunicorn <module>:<app> if gunicorn is in your requirements, else flask run
Plain Python server.py python3 -u server.py

The variable may have any name (api = FastAPI() works). For Django in production, add gunicorn to your requirements: runserver is a development server.

MCP servers. Apps with mcp or fastmcp in their requirements are recognized the same way as for Node.js, with the same limitation.

What every framework build gets

  • Snapwake's runtime helpers: @flare/runtime is available to import in Node.js apps and flare in Python apps (Runtime helpers).
  • Random number generators that are reseeded after every wake, without code changes (Sleep and wake).
  • NODE_ENV=production for Node.js apps; PYTHONUNBUFFERED=1 for Python apps, so print output reaches the log at once.
  • Your secrets and --env-file values as environment variables during the build and when the app starts.

Other languages

Go, Rust, Java, Ruby, PHP, .NET and anything else run from a Dockerfile or an image. These have been deployed without changes during testing: web servers such as nginx, Go, Rust, PHP, Java and .NET services, Spring Boot, Rails 8, Django from a Dockerfile, Gitea, Grafana, Uptime Kuma, and stock Postgres, MariaDB, MongoDB, Redis, Memcached and RabbitMQ images. The databases deploy and wake, but nothing can connect to them over TCP yet, from outside or from your other apps; see Networking.

Images that contain node 18.18 or newer, or python3, get the same reseeding of random number generators as framework builds. Set FLARE_SDK=0 in the image's ENV to turn it off. For other runtimes, see Randomness inside your runtime.