Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fleek-platform/proxy

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fleek-platform/proxy

Proxy for your Fleek edge functions

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

⚡️Fleek Proxy

Conventional Commits

fleek-proxy is a lightweight JavaScript package designed to route incoming requests and act as an API Gateway for your app. Built for edge function services, it helps forward and proxy requests to the appropriate destinations.

Features

  • Flexible Routing: Configure custom routes with wildcards.
  • Proxy Requests: Forward HTTP requests to specified destinations.
  • Default Route: Set up a default route to catch unmatched paths.
  • Seamless Integration: Written in TypeScript for type safety.

Installation

  • npm
npm install @fleek-platform/proxy
  • pnpm
pnpm install @fleek-platform/proxy

Usage

Here's a basic example of a Fleek edge function, demonstrating how to configure and use the proxy package.

import { createProxy, FleekRequest, FleekResponse } from '@fleek-platform/proxy';

// Define your routing rules
const proxy = createProxy({
  routes: {
    routes: {
      '/api/': 'https://api.foo.com/',
      '/external/': 'https://external-service.com/',
    },
    default: 'https://fallback-service.com/',
  },
});

export async function main(req: FleekRequest): Promise<FleekResponse> {
  return await proxy.proxyRequest(req);
}

Release Process

This project follows SemVer for versioning. Here's how to release a new version:

  1. Update Version Number: Bump the version number in package.json using npm version (patch/minor/major). This will update the version number in package.json and create a new Git tag.
pnpm version patch
  1. Push Changes and Tags
git push origin main --follow-tags
  1. GitHub Actions Automation: A GitHub Actions workflow automatically publishes the package to npm when a new tag is pushed.

Contributing

Thanks for considering contributing to our project!

How to Contribute

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature-branch-name.
  3. Make your changes.
  4. Commit your changes using conventional commits.
  5. Push to your fork and submit a pull request.

Commit Guidelines

We use Conventional Commits for our commit messages:

  • test: 💍 Adding missing tests
  • feat: 🎸 A new feature
  • fix: 🐛 A bug fix
  • chore: 🤖 Build process or auxiliary tool changes
  • docs: ✏️ Documentation only changes
  • refactor: 💡 A code change that neither fixes a bug or adds a feature
  • style: 💄 Markup, white-space, formatting, missing semi-colons...

Keywords

FAQs

Package last updated on 15 May 2024

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc