GithubHelp home page GithubHelp logo

emilssonn / 1dv450_pe222bz Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 1.02 MB

Assignments for https://coursepress.lnu.se/kurs/webbramverk/

Ruby 24.47% CoffeeScript 1.03% JavaScript 13.59% CSS 60.92%

1dv450_pe222bz's Introduction

1DV450

TOERH

The application uses REDIS for rate limiting. The repo includes redis-server.exe for windows or download from http://redis.io/download. Extract the zip file and go to bin/release/ and extract redisbin.zip, it should contain redis-server.exe.

Mac users: install version 2.6.x from http://redis.io/download

The api is configured to use default host/port

host: localhost port: 6379

Init

  • TOERH: bundle install
  • TOERHClient: bundle install

Init TOERH

  • Create database: rake db:migrate

  • Populate database with data: rake db:seed

  • Start the redis server

  • Start TOERH application: rails s -p 4000

Create app

  • Go to lvh.me:4000 - sign up - go to devs
  • Create application with redirect uri: http://lvh.me:3000/auth/toerh/callback
  • Open the file TOERHClient/config/initializers/omniauth.rb
  • Fill in the values: ENV["OAUTH_ID"] = 'Your API Key', ENV["OAUTH_SECRET"] = 'Your API secret'

Running

  • Start the redis server
  • Start TOERH application: rails s -p 4000
  • Start TOERHClient application: rails s
  • Go to lvh.me:3000

Admin

Admin can create, update and delete licenses and resource types via the api.

Bugs

  • The next and prev links in the collection responses are not fully functional if the requesting url contains double limit/offset parameters and so on.
  • "Bug", if there is more than 30 licenses or resourcetypes they will not show up on the angular app (offset/limit still in use for those)
  • "Bug", the SPA app is not optimized for low network use, it will do requests on each page change

API Changes

  • Added doorkeepr to better handle users. Since the api has crud functionality it requires users. It is better to never give out the user passwords to api consumers. Using 3 legged oauth2 the api consumer never get access to the user password.
  • Added resources filtering by user (firstname + lastname) to be able to filter by user without having the user_id
  • Fixed the free for all api end-points that didnt require the correct user for update/delete.

1dv450_pe222bz's People

Contributors

emilssonn 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.