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

nippy-cli

v2.7.2

Published

Cli for api building

Downloads

9

Readme

nippy-cli

Cli to build api.

Install

As it is a code scaffolder and generator, it requires to be globally installed.

npm install -g nippy

Usage

Overview

Create or go in your app folder. Then run nippy to get an interactive cli tool.

You'll be able to:

  • start a new project (scaffold and setup)
  • generate some code
  • seed database
  • project scaffolding (only the source code)
  • setup project .env file

Start a new project

Import codebase

Example here is provided with https://github.com/tilap/nippy-scaff-base

mkdir myapp
cd myapp
nippy -S

Select the base api. It will copy code in the current folder and rename your project in main files (package.json and README.md).

Init the project

nippy -i

Answer the few questions for your local environement (mostly dev env). Wait til it has install everything.

Then create your remote git host, add and do your first commit.

Deploy

Deployment is provided by fabric, based on github tags.

First time
  • You need your project to be on git (and your server must be able to access this git server).
  • You need your local fabfile (not git as it can contains production informations)
  • You need to setup specific config files on your server
Init your project on git

Add and commit your sources on a git repository

Setup your fabfile

cp fabfile.py.example fabfile.py

Edit the fabfile, replace at least the env.repository, env.hosts, env.path with your owns settings. Run

Set your project environement stuff

fab prod setup

It will init the project on your remote server. You can then add spcific server files list in fabfile (in var env.shared_paths).

Your project is ready to deploy

Deploy

Once the project is init on your remote server, you can deploy with

fab prod deploy

(of fab preprod deploy, fab testing deploy... for other environment). You can use fab prod rollback too.

Code generator

  • shortcut: nippy -g
  • description: generate some code from few quaestions and basic templating
  • notes: you can generate:
    • a database model
    • a service based on an existing model
    • a controller (bound or not to a model)
    • a router
    • a full model-service-controller-router
    • the api client

Database seeding

  • shortcut: nippy -s or nippy -s foldertoseed
  • description: seed current database (configured from .env on real ENV)
  • notes: seeding sources must be json files named with the collection you want to seed. Data are inserted with the lib, so they have to be validated.

Project scaffolding

  • shortcut: nippy -S
  • description: Copy project sources from a remote tarball or a local folder
  • notes: Scaffold is done from sources found in scaffolding package.json property or from your home .nippyrc file. It manages local scaff folder or remote tar.gz file (from github for example).

Project init

  • shortcut: nippy -i
  • description: Init project name and .env
  • notes: -

Setup project .env file

  • shortcut: nippy -c
  • description: Create a .env file for dev/testing environement
  • notes: get only the bare app requirements. Specific app configuration is not managed yet.

Dev

To locally work on nippy-cli, clone sources, then run npm run build && sudo npm link.