Skip to content
💪 Create powerful restful services with edge workers
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Install Size Vulnerabilities Downloads Licence

Restt is a powerful framework for creating fast and reliable edge worker services.

Crafted for people who love fast development cycles, quality code, security, all while maintaining flexiblity of design.

Perfect for building anything from MVPs, to large entreprise applications, to development exercises in the classroom.


Enjoy all of these amazing features with Restt

Safe and secure code

Built with zero* package dependencies to ensure your services are safe and secure from any vulnerabilities

Simple external service integration

Easily connect external API services you use like Stripe with Providers

Code flexibility

Shape your code the way you like it with few rules and restrictions

And even more with Restt-CLI

Serve your workers locally

Testing your edge workers services is easily served to you locally with Cloudworker

Auto-compilation and hot-reloading

Automatically recompile and reload your edge worker services on any changes when developing for testing in an instant ‍

Intelligent debugging tools

No more ugly stack traces - enjoy intelligently highlighted error code segments in your terminal ‍

Rapid production distribution

Distribute your edge worker services to people all around the globe instantly with Cloudflare Workers



Restt is available through the npm registry:

$ npm install restt

Restt-CLI is highly recommended alongside Restt and is also available through the npm registry:

$ npm install -g restt-cli


Creating a simple hello world service with Restt is as easy as the following:

// Import the required classes from Restt
import { Restt, Service, Resource, Response } from 'restt';

// Create a hello world service
const helloworld = new Service({

  // Define the origin of the service
  origin: '',
  // Define the list of resources
  resources: [
    // Bind a resource to the service
    new Resource({

      // Define the endpoint (
      endpoint: '/helloworld',

      // Define the resource protocol
      method: 'GET',
      // Define the response of the resource
      response() {

        // Create a response to send to the client
        return new Response({

          // Define the body of the response
          body: {
            message: 'hello world!'

// Create the Restt application
const app = new Restt();

// Bind the service to the application

If you're using Restt-CLI (and you're all configured) you can now deploy your services locally:

$ restt serve helloworld-service.js

Once served with Restt-CLI you can test your service - let's connect to our resource using curl:

$ curl http://localhost:3000/

If everything is working correctly then curl should output the following:

  "message": "helloworld!"

Now you're ready to deploy for production with Restt-CLI:

$ restt deploy helloworld-service.js

Congratulations - you've succesfully built and shipped your services to the edge using Cloudflare Workers with Restt!

You can check a more detailed overview of the above in the hello world example repository.

Check out the store example repository which includes Stripe and Cloudflare WorkersKV.

API Documentation

Check out the documentation


Restt is generously supported month to month by these amazing people, teams and organisations!

If you appreciate Restt and would like to regularly support the maintenance of it, please consider becoming a supporter, partner or sponsor.

One-time donations can also be made through PayPal.


Please feel free to implement any features by submitting a pull request.

Alternatively, you also can submit a feature request.

All contributions are greatly appreciated!



Copyright (c) 2019-present, Daniel Larkin

You can’t perform that action at this time.