Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ffflorian/pkgsource
Find the source of an npm package in an instant.
https://github.com/ffflorian/pkgsource
express github npm package server typescript
Last synced: 16 days ago
JSON representation
Find the source of an npm package in an instant.
- Host: GitHub
- URL: https://github.com/ffflorian/pkgsource
- Owner: ffflorian
- License: gpl-3.0
- Created: 2019-09-09T12:13:15.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-14T17:45:03.000Z (6 months ago)
- Last Synced: 2024-05-15T14:05:00.386Z (6 months ago)
- Topics: express, github, npm, package, server, typescript
- Language: TypeScript
- Homepage: https://pkgsource.xyz
- Size: 5.39 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# pkgsource [![Build Status](https://github.com/ffflorian/pkgsource/workflows/Build/badge.svg)](https://github.com/ffflorian/pkgsource/actions/)
Find (almost) every npm package's repository in an instant.
## Usage
Visit `pkgsource.xyz/{packageName}` in your web browser, e.g. [`pkgsource.xyz/nock`](https://pkgsource.xyz/nock).
### Get the repository for a specific version
Visit `pkgsource.xyz/{packageName}@{version}` in your web browser, e.g. [`pkgsource.xyz/[email protected]`](https://pkgsource.xyz/[email protected]). This also works with npm tags, e.g. [`pkgsource.xyz/typescript@beta`](https://pkgsource.xyz/typescript@beta)
If no version is specified, the latest version is assumed.
### Get the raw data
Visit `pkgsource.xyz/{packageName}?raw` in your web browser, e.g. [`pkgsource.xyz/commander?raw`](https://pkgsource.xyz/commander?raw).
### Get source code for a specific version
Visit `pkgsource.xyz/{packageName}?unpkg` in your web browser, e.g. [`pkgsource.xyz/[email protected]?unpkg`](https://pkgsource.xyz/[email protected]?unpkg). You can use the same features (`raw`, version, tags) as mentioned above.
## Server usage
### Docker
```
docker run -p 4000:4000 ffflorian/pkgsource
```### Local
Prerequisites:
- [Node.js](https://nodejs.org) >= 10.9
- [yarn](https://classic.yarnpkg.com) < 2### Start the server in development mode
```
yarn
yarn start:dev
```### Start the server in production mode
```
yarn
yarn dist
yarn start
```### Swagger UI
Open [`/_swagger-ui`](https://pkgsource.xyz/_swagger-ui) in the browser to try it out.