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

flipflops

v0.1.8

Published

Flip Flops: Quite blogging, go to the beach.

Downloads

9

Readme

Flip Flops

Finish Blogging. Go to the beach.

Take a little syntax out of your life. It's just a file system and your words.

Running a static blog

  1. git clone flipflops
  2. Create a folder for your project. Put it in source control, if you want. This folder is outside of the flipflops repo and is completely separate.
  3. Copy config.js from flipflops repo to your project.
  4. Change the few settings to your name, blog title, etc.
  5. Create a folder, posts. This folder has all your blog posts, distinct from pages in the site.
  6. Inside posts, create folders for YYYY/MM/DD/ for each blog post. Every post must be in a folder meeting that structure.
  7. To create a post, create a folder and index.md as YYY/MM/DD/post-slug/index.md
  8. To configure the post, create a YAML header. Current frontmatter supported is
---
title: Post Title
date: 2014-06-25T15:31:00.000-0500
author: Post Author (default's to author in config::site.author)
categories:
  - Category
  - Other
---

Once that's in place, you're ready to start flipflops. From the flipflops folder run CONFIG_FILE=/Users/username/full/path/to/project/config.js node app.js

Visit http://localhost:1024/

Hacking

If you do happen to like hacking on the beach, check out our design docs!

Getting Started

Flipflops runs a few different ways.

  • node For standalone development work, simply running node app.js will have you up and running most quickly.
  • Docker For production use, grab the docker container (coming soon!).
  • Passenger For some development workflows, Phusion Passenger is a great tool for managing the lifecycle of the app.
  • Supervisor To minimize external dependencies, Flipflops is configured to use [node-supervisor][supervisor] for lifecycle management.

The npm start script will use passenger if it's in the path, or supervisor otherwise. The docker container uses supervisor, but that's under the hood.

Configuring the environment

Flipflops can be configured using a variety of environment variables, including NODE_NEV, NEW_RELIC_LICENSE_KEY, and many others. It is your responsibility to handle those safely for your environment. Flipflops has a deploy script that helps out, if you have a private git repo.

Create a private repo, for all secure project settings (this works across all projects). Create a branch for flipflops (git branch --orphan flipflops ; git checkout flipflops). Create a .sh file for each environment you need; I create development.sh and production.sh at a minimum. Put any environment vars in those. Commit and push this branch.

In flipflops, create an environment variable export DOTREPO=git://PATH_TO_REPO that you just created. Run sh ./src/deploy/env/load.sh ENVIRONMENT, where ENVIRONMENT is the name of the .sh file (without the .sh) you just created. Now, when you start flipflops with npm start, these settings will be loaded.