Giter VIP home page Giter VIP logo

pico_api's Introduction

Pico API

A tiny boilerplate JSON API template in ruby. Its minimal footprint makes it ideal for microservices or even full blown APIs. It has been created for those who don't need the RAILS "magic" and bloat. Can easily create different architectures, like STAR, CQRS, DDD..., and MVC.

Pico API is just a collection of the fastest ruby libraries put together to form a basic API environment, with the JSON:API specification. It doesn't create any folder structures for your business logic, it only creates the initial configurations to get you started.

Example demo project can be found here

Libraries Used

Usage

Create your app

gem install pico_api

pico_api --new my_app

cd my_app

bundle install

Configure your database

Migration info: https://rom-rb.org/5.0/learn/sql/migrations/

  • Add the database config details in config/database.yml
  • Setup the Database: rake db:setup
  • Create a migration: rake db:create_migration[create_users] (include your preferred DB gem in the Gemfile)
  • Run the migrations: rake db:migrate
  • Run the server: rackup -p 3001

Routing

Routing info: https://github.com/jeremyevans/roda

Add routing info in config/application.rb file

Development

  • Create Database config
  • Hook a json-api library
  • Handle Errors
  • Create a Logger config
  • Create a testing environment
  • Allow multiple db gateways in the config
  • Add irb/pry console script
  • Seperate configs to different environments (dev, prod, etc..)

Contributing

All Pull Requests are welcome, from a single typo to a new feature.

  • Fork this repo
  • Create a new branch, add your changes with tests when necessary
  • Submit a Pull Request

pico_api's People

Contributors

alexavlonitis avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.