Giter Site home page Giter Site logo

secretnotes's Introduction

Secretnotes

What you need to know

  • This is a Ruby on Rails application
  • This application was generated with the rails_apps_composer gem
  • It requires ruby 2.1.2
  • It requires rails 4.1.5
  • There is one test which requires the selenium driver, so the latest version of Firefox is required.
  • Data store is sqlite
  • It's tested with Rspec

Great! But what is it?

This is a simple API with two end points for CREATING and SHOWING Notes.

Creating and Showing notes requires a password. Passwords are hash salted, and the content of the notes are encrypted with the password as the encryption key.

Interesting. So if it's an API why is there a Javascript tests?

I created a UI on the root of the app for interfacing with the API. There's some JS in there. Soz about that.

Ahh, I see. Where's the documentation??

Glad you asked.

Create

post /api/v1/notes, {:password, :title, :body}

Required Parameters

  • :password

Example post /api/v1/notes, {password:'secret', title:'a title', body: 'a body'}

Response

{
  "id": 13,
  "title": "a title",
  "body": "a body"
}

Show

get /api/v1/:id, {:password}

Required Parameters

  • :id
  • :password

Example get /api/v1/notes/13, {password:'secret'}

Response

{
  "id": 13,
  "title": "a title",
  "body": "a body"
}

Hmm, ok. So how do I get this running locally

Make sure you've got all the requirements (see first section above).

$ bundle install
$ rake db:migrate
$ rspec
$ rails s

Then browse to http://localhost:3000/

secretnotes's People

Contributors

thatandyrose avatar

Watchers

 avatar James Cloos 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.