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

cf-quick-start

v1.5.6

Published

helper tool for create javascript apps

Downloads

10

Readme

cf-quick-start

cf-quick-start is a CLI-based project creation package that will provide you with fleshed-out, functional starter code in just a few easy steps.

Installation and Use

  1. Install the package globally
npm i -g cf-quick-start
  1. Make this call in the location you would like to create your project
cf-quick-start
  1. Select the project you'd like to make, name it, choose a license, and decide if you'd like to create a GitHub repo.

  2. Navigate to your new files and npm i

  3. Get coding!

About the Package

  • This package currently provides options to create the following projects:
    • An API-Server with a cf401-api-server package dependency that provides full API-Server functionality, without cluttering up your codebase. You can even create your own models and routes in the provided folders, and they'll sync right up with the package (please note: this functionality uses symlinks, which may not work correctly on WindowsOS running WSL).
    • An API-Server with full starter code provided in your project
    • An express server with full starter code provided in your project
    • A suite of config files to get you ready to start on a backend JS project of your choosing
    • A react-app that provides starter code to create a React-based project

Running your project

API-Server

  • Run npm start to launch the server
  • Open a browser and go to localhost:3000/api/v1/example. You should see the results for all the items in that database collection (it may be 0 when you get started)
  • A suite of tests is included in the project. To check them, run npm test
  • To add new models, add a new folder to the models folder and name it after your route. Then, create two files in that folder. One called <modelname>-model.js and one called <modelname>-schema.js
  • Routes can be added and updated in the v1.js file.
  • To add entries to your collections, we recommend using HTTPie, which you can install globally.
    • For example, to add something to your examples model, open a new tab or window in your terminal, you would enter the following command: echo '{"name":"Test Name","description":"Test description"}' | http POST :3000/api/v1/example

API-Server Package

  • Before you start coding, run npm run link in your terminal. This command sets up a symlink between the package and your codebase that allows you to add routes and models. This command will also bring in the models and routes from the package, so you can take a closer look at the proper formatting for your files names and file contents
    • Note: this functionality may not work correctly on WindowsOS running WSL
  • To run the server, enter npm start
  • Open a browser and go to localhost:3000/api/v1/teams. You should see the results for all the items in that database collection (it may be 0 when you get started)
  • To add new models, add a new folder to the models folder and name it after your desired route name. Then, create two files in that folder. One called <modelname>-model.js and one called <modelname>-schema.js
  • To add new routes, add a new file to the routes folder. You can create new routes within that file, just be sure to follow a format similar to the provided example
    • To add entries to your collections, we recommend using HTTPie, which you can install globally.
    • For example, to add something to your examples model, open a new tab or window in your terminal, you would enter the following command: echo '{"name":"Test Name"}' | http POST :3000/api/v1/teams

Config files

  • This project is just config files, plain and simple! Feel free to update the files as you see fit.

Express Server

  • Run npm start to launch the server
  • Open a browser and go to localhost:3000/. You should see some text rendered from the foo.html file.
  • You'll also recieve an error message if you try to access a route that doesn't exist
  • This server can be used as a base for any app that requires and express server

React-App

  • Run npm start to launch the app
  • This will launch localhost:3000/ in your browser
  • From there, you can edit your app and save, and the browser will auto-reload

About the creators

This package was created by Ryan Gallaway, Becca Lee, Jared Pattison, and Tanner Seramur as a midterm project for Code Fellows JavaScript 401d28. Some of the template code was provided by their instructor, John Cokos.

Want to contribute?

Feel free to submit a PR for review on github