Giter Club home page Giter Club logo

apitogo's Introduction

apitogo Build Status

"An api to go, please."

Make a fake api without a line of code for development purposes

Work in progress

I wanna help!

You can help this project by:

  • Taking a look on the desired features below and implementing it.

  • Help/suggestions are appreciated. Feel free to open an issue with any suggestion.

  • Using and giving feedback

Motivation

There are two motivations that made me create this project:

  • Prototyping SPAs.

    Each time that I need to create a SPA for an API that was designed but still not implemented I need to create my on server to provide the data needed to test.

  • Third Part APIs running locally

    Each time that I have a project that relies on third part apis I have problems to run it locally.

That's why I am working on this app so next time that I need some simple API. I gonna just get an api to go.

Usage

It implements a bunch of endpoits by default for you to use.

Json Api

Create a collection file inside the folder, for instance, posts.json with the follow format:

{
  "data": [
    { "id": 1, "title": "Some post" },
    { "id": 2, "title": "Awesome post" },
    { "id": 3, "title": "Another post" }
  ]
}

Run the apitogo in the same folder:

apitogo run

That's it! Here is your api to go, sir. Try out:

curl -XGET http://localhost:8080/posts

Or

curl -XGET http://localhost:8080/posts/1

It runs by default at port 8080 and for each json file inside the folder it is going to create a endpoint like this:

  • /posts returns all data from inside the file
  • /posts/:id returns an object from inside the file

Authentication API

It implements a basic oauth2 server also you can use for development

  • /authorize for webclients authorizations
  • /token for token requests

Default client_id: 1234 and client_secret: apitogo1234

Future implementations

  • Json API

    • Json endpoint from files
    • Filter by id
    • Query by parameters
    • Restfull Api (GET, POST, PUT, DELETE)
    • Sort
    • Limit
    • Follow json:api standards
    • Graphql support
  • Authentication API

    • Oauth2 (token)
    • Basic (user/password)
    • Custom Clients ID/Keys
    • Login Page
  • Websocket API

    • Create/connect channels
  • Webhooks API

    • configure callback requests endpoint
  • Customization

    • Routes
    • Schema
  • Distribution

    • Installation pack for brew
    • Installation Script for linux
  • Others

    • Travis

Contributing

If you want to implement a feature, follow this steps:

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request

Pull Requests are really welcome! Others support also.

Pull Request should have unit tests

License

This project was made under MIT License.

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.