-
Git repository
git clone git@github.com:bilalnaeem/snippet.git
-
Apply schema on databases
bin/rake db:schema:load
-
To visit site on localhost:3000
bin/rails
-
To run the full test-suite use the following command:
bin/rake test;
-
To run the full spec-suite use the following commands:
bin/rspec spec
-
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
-
Notifications
You must be signed in to change notification settings - Fork 0
bilalnaeem/snippet
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published