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

generaptr-cli

v0.2.1

Published

Generaptr is a node cli package that helps when starting up a project by generating boilerplate code.

Downloads

4

Readme

npm Build Status Join the chat at https://gitter.im/generaptr/generaptr dependencies Greenkeeper badge FOSSA Status

generaptr-cli is a node cli package that helps when starting up a project by generating boilerplate code for Express api.


Table of Contents

  1. Documentation
  2. Minimum Requirements
  3. Installation
  4. Examples
  5. Support
  6. Code of Conduct
  7. Contributing
  8. License
  9. References

Goal and Philosophy

generaptr-cli strives to be an easy and useful command line tool for generating boilerplate api for a given database structure.

generaptr-cli should ease the process of:

  • starting a new backend project
  • writing boilerplate crud operations
  • writing api specs

Documentation

Minimum Requirements

The package was developed under node 7.5 so a minimum requirement would be:

  • node >= v7.5.0
  • npm >= v3.10.10

Installation

npm install generaptr-cli

Examples

When starting generaptr-cli the screen displayed below will appear.

Here, the two possible actions are shown, actions which will decide on which flow will the execution continue:

Generate Raml spec flow

Required information for generating the raml api spec is presented in the next screen.

In the screenshot we can see the logs from a successful api spec generation.

Folder structure for a generated api spec.

Generate Api flow

While generating the api boilerplate a few things are required, things which will be made clear in the next screenshots.

In the screenshot above the user is prompted to choose the input source, right now we support a database connection or a valid raml spec (works best with raml spec's generated by generaptr-cli).

In the screenshot above presents the database output choice, currently we only support MySql but more will come in the future.

In the last two screenshots we can see the logs from a successful api generation.

Following the same steps but with a different input source renders the same result.

Folder structure for a generated api boilerplate.

Support

You should expect mostly good support for the CLI below. This does not mean we won't look at issues found on other command line - feel free to report any!

  • Mac OS:
    • Terminal.app
    • iTerm
  • Windows:
    • cmd.exe
    • Powershell
    • Cygwin
  • Linux (Ubuntu, openSUSE, Arch Linux, etc):
    • gnome-terminal (Terminal GNOME)
    • konsole

Code of Conduct

See Code of Conduct for more information.

Contributing

Unit test

Unit test are written in Mocha and Assert. Please add a unit test for every new feature or bug fix. npm test to run the test suite.

Documentation

Add documentation for every API change. Feel free to send typo fixes and better docs!

License

Copyright (c) 2017 Darius Cupsa (twitter: @cupsadarius) Licensed under the MIT license.

FOSSA Status

References