Giter Site home page Giter Site logo

blanvam / app-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sethherr/grape-doorkeeper

1.0 1.0 1.0 1.24 MB

APP-API

Home Page: https://v-app-api.herokuapp.com/

License: MIT License

Ruby 64.08% JavaScript 0.18% CoffeeScript 2.02% CSS 6.21% HTML 27.51%

app-api's Introduction

App-API

Build Status Code Climate Dependency Status

Deploy

App with versioned API, secured with OAuth2 and automatically documented.

This is a basic Rails 4 application with Doorkeeper, Grape & Swagger for getting to API building quickly.

You can view the live app and the Swagger-ui documentation for developers.

Set up

Create .env file in the main folder of the project

.env file

SECRET_KEY_BASE=
DEVISE_SECRET_KEY=

DEFAULT_HOST=localhost:3000
EMAIL_ADDRESS=
EMAIL_PORT=
EMAIL_DOMAIN=
EMAIL_USER_NAME=
EMAIL_PASS=
EMAIL_AUTHENTICATION=
EMAIL_STARTTLS=

APP_API_DATABASE_USER=
APP_API_DATABASE_PASSWORD=

First bundle install and rake db:setup

Run rake start to get the server running locally. It runs at http://localhost:3001

Otherwise

Run rails s to get the server running locally. It runs at http://localhost:3000

Notes

Grape is mounted in app/controllers/api, as described in the excellent Introduction to building APIs with Grape by Monterail, and part 2 of the series.

There are are other posts in the series which are worth reading, particularly OAuth Implicit Grant with Grape, Doorkeeper and AngularJS.

There is also a Railscast on doorkeeper.

Important things in the Gemfile:

Also important, but maybe not as necessary to know about:


If you want to change the name of the app, swap out:

Testing

Rspec and guard - run bundle exec guard to watch your spec files for changes and rerun tests for those files, otherwise if you prefer just run rspec

app-api's People

Contributors

blanvam avatar sethherr avatar

Stargazers

mads hansen avatar

Watchers

 avatar

Forkers

adriancm

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.