/rest-cli

A perfect tool for creating Web Service

Primary LanguageJavaScriptzlib LicenseZlib

Rest CLI Build Status PyPI version Documentation

If you love ?

  • Beautiful restful web service with standard architecture
  • The fastest way to get things done with less human coding
  • Synchronize changes from component to documentation
  • Explicit request & response with proved performance via Protobuf
  • Backend by an industrial framework with your favorite language (PHP or Go)

Then this powerful tool is the right choice for you.

Currently rest-cli supports for Go and PHP with MySQL database.

Prerequisite

Rest CLI

  • Docker
  • Python 2.7 with pip
  • Protobuf compiler
First installation will require you pick your languages.
then creator will guide you the prerequisite for each language.

Installation

$ pip install rest-cli

Road map

  • Create web service base on a lightweight skeleton
  • Database schema migration
  • Reverse schema to model - repository - service and dependency injectors
  • Support built-in query annotations
  • Compile api routes and generate controller with integration tests
  • Serve and test application
  • Generate swagger documentation base on api routes
  • Abstraction parser for independent with programming language
  • Integrate Request/Response with protocol buffers
  • Support Service - Repository symbolic link to comply top down architecture
  • Export service interfaces for inter-communication
  • Support RPC exception via response verification

Usages

  1. Create web service application
  • --language : Available supported language are PHP and Golang
  • --quite : Quite mode without asking anything about configuration
  • --force : Force creating application without complaining about existing project
  • --mysql : Start a mysql container with default information
$ rest create <awesome-service>
  1. Change directory to service and write some migrations at src/Shared/Migration
$ rest migrate
  1. Synchronize model - repository - service - controller - test cases
  • To create some awesome apis, update your routes at config/api/*.json
$ rest sync
  1. View route list
  • To see which routes are configured and manage apis
$ rest route
  1. Serve your application to test in browser
$ rest serve
  1. Test your application with PHPUnit
$ rest test
  1. Check current version
$ rest version
  1. Update new version of rest-cli ?
$ rest upgrade
  1. Need more help ?
$ rest --help

API Documentation

After rest sync you can serve your service with rest serve

Swagger Documentation should be ready at http://localhost:8000/docs

License

Rest CLI and related projects are licensed under the MIT

Thanks for the sponsor from GO1 Company

~ Happy Coding ~