📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

@fastly/compute-js-static-publish

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastly/compute-js-static-publish

Static Publisher for Fastly Compute JavaScript

7.0.1
latest
Source
npm
Version published
Weekly downloads
2.7K
-25.87%
Maintainers
1
Weekly downloads
 
Created
Source

@fastly/compute-js-static-publish

Fastly Compute + KV Store for static websites and web apps.

This CLI tool helps you:

  • ✅ Deploy static sites to Fastly Compute with zero backend
  • 📦 Store files in Fastly KV Store efficiently
  • 🗂 Publish to named collections (live, preview-42, etc.)
  • 🔄 Switch between collections at runtime
  • 🧹 Clean up old or expired assets

Quick Start

Create a directory for your project, place your static files in ./public, then type:

npx @fastly/compute-js-static-publish@latest --root-dir=./public --kv-store-name=site-content

🔧 Local Preview

cd compute-js
npm install
npm run dev:publish          # 'publish' your files to the simulated local KV Store
npm run dev:start            # preview locally

Serves your app at http://127.0.0.1:7676, powered by a simulated KV Store.

🚀 Deploy to Production

When you're ready to go live, create a free Fastly account if you haven't already, and then:

cd compute-js
npm run fastly:deploy        # deploy the app
npm run fastly:publish       # upload your static files

In the future, unless you have further changes to make to your app itself, you can upload further updates to your static files:

cd compute-js
npm run fastly:publish       # upload your static files

Features

  • Named collections for previews, staging, production
  • SPA + fallback handling
  • Precompressed Brotli/gzip support
  • CLI tools for publish, promote, and cleanup

Documentation

📘 Full documentation available on GitHub:
https://github.com/fastly/compute-js-static-publish

Keywords

compute-js

FAQs

Package last updated on 24 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts