0.0.9 • Published 8 months ago

@pigeonposse/api-2025 v0.0.9

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
8 months ago

PIGEONPOSSE API

HEADER

Run the PigeonPosse API.

Rest API to get data from your GitHub repository.

Prerequisites

Installation

npm i @pigeonposse/api-2025
# or
pnpm i @pigeonposse/api-2025

CLI Usage

GH_TOKEN="your-github-token" GH_USER="your-github-user" npx @pigeonposse/api-2025
# or
GH_TOKEN="your-github-token" GH_USER="your-github-user" pnpx @pigeonposse/api-2025

Or with a installation

npm i @pigeonposse/api-2025
GH_TOKEN="your-github-token" npm exec pigeonposse-api-2025
# or
pnpm i @pigeonposse/api-2025
GH_TOKEN="your-github-token" GH_USER="your-github-user" pnpm exec pigeonposse-api-2025

Library Usage

Standard server

import { createServer } from '@pigeonposse/api-2025' // OR: import { createServer } from '@pigeonposse/api-2025/server'
createServer( {
 DEBUG: 'false',
 GH_TOKEN: "your-github-token",
 GH_USER: 'angelespejo',
 GH_BRANCH: 'main',
 GH_USER_TYPE: 'user',
 API_PORT: 1312,
 API_STORE_PATH: 'build/store/pigeonposse.json'
} )
node standard-server.js
## Override OPTION
DEBUG=true node standard-server.js

Local server

import { createLocalServer } from '@pigeonposse/api-2025' // OR: import { createLocalServer } from '@pigeonposse/api-2025/server'

createLocalServer( {
 DEBUG: 'false',
 GH_TOKEN: "your-github-token",
 GH_USER: 'angelespejo',
 GH_BRANCH: 'main',
 GH_USER_TYPE: 'user',
 API_PORT: 1312,
 API_STORE_PATH: 'build/store/pigeonposse.json'
} )
node local-server.js
## Override OPTION
DEBUG=true node local-server.js

Custom server

You can use only the app, for build your server wetheaver you want.

Standard app

import { appStandard } from '@pigeonposse/api-2025' // OR: import app from '@pigeonposse/api-2025/standard'

// Build you server

Local app

import { appLocal } from '@pigeonposse/api-2025' // OR: import app from '@pigeonposse/api-2025/local'

// Build you server

Change enviroment variables

import { ENV } from '@pigeonposse/api-2025' // OR: import { ENV } from '@pigeonposse/api-2025/env'

ENV.DEBUG = 'true'
ENV.GH_USER='angelespejo'
ENV.GH_BRANCH='main'
ENV.GH_USER_TYPE='user'

// Do something

Add custom config in your repositories

This package use Collectium Github Preset for get Github data. For more information read Docs

0.0.9

8 months ago

0.0.8

8 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago