npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fleek-platform/proxy

v0.1.0

Published

Proxy for your Fleek edge functions

Downloads

100

Readme

⚡️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...