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

cfpm

v0.1.1

Published

Code Fellows Package Manager is a Code Fellows 401 project to create a private package manager

Downloads

5

Readme

CFPM

Code Fellows Package Manger - create your own personal package manager

About

Code Fellows Package Manager was created by Joshua Haan and Seth Moore for Code Fellows 401 project. The purpose is to allow users to create a lightweight, private package manager that can be installed on any server/computer.

Features

  • Files only accessible through CRUD routes: potential for private packages
  • Installable through NPM
  • Corresponding CLI
  • Version control: publish and request specific versions
  • Author authorization

Installation

Install onto your server with NPM npm install cfpm

Set desired server port and mongodb url as environment variables or by creating a .config.js file in root:

module.exports.DB = 'your:uri-goes.here'
module.exports.S_PORT = 3000

Routes

Using the CLI is recommended, but CFPM can take HTTP requests from custom clients fairly easily.

npm i -g cfpm-cli

/Login

This route takes authorization header with a username and password and returns a token on the res object if the account exists. For demo purposes, this server does not allow for account creation, but two test accounts are created on startup:

{
  userName: 'haanj',
  name: 'Joshua',
  password: 'password123'
}
{
  userName: 'seth',
  name: 'seth',
  password: 'seth'
}

/projects

POST

POST requests to /projects will create a new package, if none exists. Requests must include an authentication token or they will be rejected. Request headers must also include a projectname and version parameters. If the package does not exist, a new package will be created with that version number, and the attached file will be stored on the server.

PUT

PUT requests to /projects will update an existing package to a new version. Requests must include an authentication token belonging to the original package author, or they will be rejected. Request headers must also include a projectname and version parameters. If the package exists and the version number is incremental, the package will be updated and the attached file will be stored on the server as the current version of the package.

GET

GET requests to /projects will return a stored file corresponding tot he requested package number. GET requests require the request header to include a projectname parameter. A version parameter may optionally be included to return a specific version. If the version parameter is missing or is incorrect, the latest version will be returned as a response.