JavaScript SDK and CLI for building JavaScript applications on [Fastly Compute](https://www.fastly.com/products/edge-compute/serverless).
npm install @fastly/js-computeJavaScript SDK and CLI for building JavaScript applications on Fastly Compute.
!npm version !npm downloads per month
We recommend using the Fastly CLI to create, build, and deploy JavaScript Fastly Compute services, as described on the Fastly Developer Hub.
Detailed documentation for JavaScript Fastly Compute services is also available on Fastly Developer Hub.
The Fastly Developer Hub has a collection of example JavaScript applications.
Here is a small example application:
``js
///
async function app(event) {
const request = event.request;
return new Response(You made a request to ${request.url})
}
addEventListener("fetch", event => {
event.respondWith(app(event));
});
`
The API documentation for the JavaScript SDK is located at https://js-compute-reference-docs.edgecompute.app.
If you find any security issues, see the Fastly Security Reporting Page or send an email to: security@fastly.com`
We plan to disclose any found security vulnerabilities per the GitHub security vulnerability guidance. Note that communications related to security issues in Fastly-maintained OSS as described here are distinct from Fastly security advisories.
The changelog can be found here.