0.1.10 • Published 10 months ago

@pigeonposse/api-2024 v0.1.10

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

PIGEONPOSSE API

HEADER

Run the PigeonPosse API.

Rest API to get data from your GitHub repository.

Prerequisites

Installation

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

CLI Usage

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

Or with a installation

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

Library Usage

Standard server

import { createServer } from '@pigeonposse/api-2024' // OR: import { createServer } from '@pigeonposse/api-2024/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-2024' // OR: import { createLocalServer } from '@pigeonposse/api-2024/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-2024' // OR: import app from '@pigeonposse/api-2024/standard'

// Build you server

Local app

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

// Build you server

Change enviroment variables

import { ENV } from '@pigeonposse/api-2024' // OR: import { ENV } from '@pigeonposse/api-2024/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.1.10

10 months ago

0.1.9

10 months ago

0.1.8

10 months ago

0.1.7

10 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago

0.0.2

11 months ago