Skip to content

bilalnaeem/snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. Git repository

    git clone git@github.com:bilalnaeem/snippet.git
    
  2. Apply schema on databases

    bin/rake db:schema:load
  3. To visit site on localhost:3000

    bin/rails
    
  4. To run the full test-suite use the following command:

    bin/rake test;
  5. To run the full spec-suite use the following commands:

    bin/rspec spec
  6. To test 4 API Calls

    i) GET All Snippets
      Get http://127.0.0.1:3000/api/v1/codes Content-type: Application/json
    
    ii) GET Specific Snippet
      Get http://127.0.0.1:3000/api/v1/codes/:id Content-type: Application/json
    
    iii) Create a Snippet
      POST http://127.0.0.1:3000/api/v1/codes/create Content-type: Application/json
      data => { code:{ text: "bla blah", is_private: true} }
    
    iv) Get Snippet show
      POST http://127.0.0.1:3000/api/v1/codes/:id/:token Content-type: Application/json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published