Skip to content

An example implementation of a Restful API using Buffalo Web Framework.

Notifications You must be signed in to change notification settings

conradwt/zero-to-restful-api-using-buffalo

Repository files navigation

Zero to Restful API using Buffalo

The purpose of this example is to provide details as to how one would go about creating a Restful API with the Buffalo Web Framework.

Getting Started

Software requirements

Communication

  • If you need help, use Stack Overflow. (Tag 'go')
  • If you'd like to ask a general question, use Stack Overflow.
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Quick Installation

  1. clone this repository

    $ git clone [email protected]:conradwt/zero-to-restful-api-using-buffalo.git
    
  2. change directory location

    $ cp /path/to/zero-to-restful-api-using-buffalo restful_api
    $ cd /path/to/restful_api
    
  3. create, migrate, and seed the database

    $ buffalo db create
    $ buffalo db migrate
    $ buffalo task db:seed
    
  4. start the server

    $ buffalo dev
    
  5. navigate to the Postman application

    a. set the HTTP request type to

    GET
    

    b. set the request URL to

    http://localhost:3000/players
    

    c. click Headers, add the following key and value pair:

    Key

    Content-Type
    

    Value

    application/json
    

    d. click Send, and you should see something like the following:

    [
      {
        "id": "39bac424-8734-4705-a06b-8a20c1bfd55c",
        "created_at": "2018-08-03T00:14:51.941791Z",
        "updated_at": "2018-08-03T00:14:51.941792Z",
        "first_name": "John",
        "last_name": "Doe",
        "email": "[email protected]",
        "age": 25,
        "position": "forward"
      },
      {
        "id": "7e46a404-b361-4e3c-b16d-73ebd779c28f",
        "created_at": "2018-08-03T00:14:51.953796Z",
        "updated_at": "2018-08-03T00:14:51.953797Z",
        "first_name": "Jane",
        "last_name": "Doe",
        "email": "[email protected]",
        "age": 23,
        "position": "goalkeeper"
      }
    ]

Tutorial Installation

WIP

Production Setup

Ready to run in production? Please check our deployment guides.

Buffalo References

Support

Bug reports and feature requests can be filed with the rest for the Zero to Restful API using Buffalo project here:

License

Zero to Restful API using Buffalo is released under the MIT license.

Copyright

copyright:: (c) Copyright 2018 Conrad Taylor. All Rights Reserved.

About

An example implementation of a Restful API using Buffalo Web Framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published