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 🙏

© 2026 – Pkg Stats / Ryan Hefner

paymove-qr-test-server

v1.0.0

Published

Test server for @paymove_io/qr-generator package

Readme

PayMove QR Generator - Test Server

Prosty serwer Node.js do testowania paczki @paymove_io/qr-generator z interfejsem webowym.

🚀 Szybki start

1. Instalacja zależności

npm install

2. Linkowanie paczki (wymagane)

Przed uruchomieniem serwera musisz podlinkować swoją paczkę lokalnie:

# W katalogu z Twoją paczką @paymove_io/qr-generator
npm link

# W tym katalogu (paymove-qr-node-test)
npm link @paymove_io/qr-generator

3. Uruchomienie serwera

# Tryb produkcyjny
npm start

# Tryb deweloperski (z auto-restart)
npm run dev

Serwer będzie dostępny pod adresem: http://localhost:3000

📋 Dostępne endpointy

GET /

  • Interfejs webowy do testowania

GET /api/status

  • Sprawdza status załadowania paczki
  • Zwraca informacje o dostępnych funkcjach

POST /api/generate-banner

  • Generuje banner HTML z QR kodem
  • Parametry:
    • data (string) - dane do zakodowania w QR
    • format (string) - format wyjściowy: "svg", "png", "jpg"
    • width (number) - szerokość bannera w px
    • height (number) - wysokość bannera w px
    • quality (number) - jakość dla PNG/JPG (0.1-1.0)
    • qrOptions (object) - opcje QR kodu

POST /api/generate-qr

  • Generuje sam QR kod (bez bannera)
  • Parametry:
    • data (string) - dane do zakodowania
    • size (number) - rozmiar QR w px
    • margin (number) - margines w px
    • color (object) - kolory: {dark: string, light: string}

GET /api/test-formats

  • Testuje wszystkie dostępne formaty wyjściowe
  • Zwraca status dla każdego formatu

🎨 Funkcje interfejsu webowego

  • Status paczki - sprawdza czy paczka została poprawnie załadowana
  • Generator bannera - tworzy bannery HTML z QR kodami w różnych formatach
  • Generator QR - generuje same QR kody
  • Test formatów - sprawdza dostępność wszystkich formatów wyjściowych

🔧 Przykład użycia API

Generowanie bannera PNG

curl -X POST http://localhost:3000/api/generate-banner \
  -H "Content-Type: application/json" \
  -d '{
    "data": "https://paymove.io",
    "format": "png",
    "width": 800,
    "height": 200,
    "quality": 0.95,
    "qrOptions": {
      "size": 120,
      "margin": 4,
      "color": {
        "dark": "#000000",
        "light": "#FFFFFF"
      }
    }
  }'

Generowanie QR kodu

curl -X POST http://localhost:3000/api/generate-qr \
  -H "Content-Type: application/json" \
  -d '{
    "data": "https://paymove.io",
    "size": 200,
    "margin": 4,
    "color": {
      "dark": "#000000",
      "light": "#FFFFFF"
    }
  }'

🐛 Rozwiązywanie problemów

Paczka nie jest załadowana

Jeśli widzisz błąd "Paczka @paymove_io/qr-generator nie jest dostępna":

  1. Sprawdź czy wykonałeś npm link w katalogu z paczką
  2. Sprawdź czy wykonałeś npm link @paymove_io/qr-generator w tym katalogu
  3. Sprawdź czy paczka ma poprawną strukturę eksportów

Błędy podczas generowania

  • Sprawdź logi serwera w konsoli
  • Upewnij się że wszystkie wymagane parametry są przekazane
  • Sprawdź czy format jest obsługiwany

📁 Struktura projektu

paymove-qr-node-test/
├── server.js          # Główny plik serwera
├── package.json       # Zależności i skrypty
├── public/
│   └── index.html     # Interfejs webowy
└── README.md          # Ta dokumentacja

🔧 Uwagi dotyczące ES6 modules

Projekt używa ES6 modules ("type": "module" w package.json), więc:

  • Wszystkie importy używają składni import zamiast require
  • __dirname jest konfigurowane ręcznie dla kompatybilności z ES modules
  • Twoja paczka @paymove_io/qr-generator powinna eksportować funkcje jako named exports lub default export

🔗 Linki