Socket
Socket
Sign inDemoInstall

edgespec

Package Overview
Dependencies
253
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    edgespec

Write Winter-CG compatible routes with filesystem routing and tons of features


Version published
Weekly downloads
12K
decreased by-32.49%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

☃️ edgespec

EdgeSpec is an opinionated HTTP framework for TypeScript. Out of the box, it:

  • Uses filepath-based routing
  • [Soon] generates ergonomic SDKs across multiple languages
  • [Soon] generates OpenAPI documentation
  • Provides end-to-end type safety for your middleware and endpoints
  • Can be built into a zero-dependency module and embedded into other applications

EdgeSpec primarily targets the common minimum API described by WinterCG, but it can also target Node.js, Bun, and Deno. Currently, the two main "edge"/WinterCG-compatible platforms targeted are Cloudflare Workers and Vercel Edge Functions.

Regardless of your target, EdgeSpec provides a consistent API and encourages emulation of the WinterCG runtime when developing.

Getting Started

To start a new project:

npm create edgespec@latest # [soon]

npm run dev

If you want to add EdgeSpec to an existing project, check out this recipe

Usage

Alternatives

EdgeSpec may not be the right choice for your project. This list is not exhaustive, but here are some alternatives:

  • If your backend and frontend are tightly coupled:
  • If you dislike filepath-based routing and need to run within a WinterCG-compatible environment:
  • If you enjoy dependency injection:
  • If your project is mainly frontend with a few API routes:

Keywords

FAQs

Last updated on 11 Apr 2024

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc