New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

generaptr-cli

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generaptr-cli

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

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 02 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc