-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added api functionality to plain index.html
- Loading branch information
Victor
committed
May 24, 2017
1 parent
98a08d4
commit cbd9a9f
Showing
15 changed files
with
19 additions
and
194 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"require": { | ||
"slim/slim": "^3.8", | ||
"slim/twig-view": "^2.2" | ||
"slim/slim": "^3.8" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
fetch('api/books') | ||
.then(response => response.json()) | ||
.then(books => printJson(books)) | ||
.then(books => console.log(books)) | ||
|
||
function printJson(obj) { | ||
console.time('printJson'); | ||
var pre = document.createElement('pre'); | ||
pre.textContent = JSON.stringify(obj, null, '\t'); | ||
document.body.innerHTML = ''; | ||
document.body.appendChild(pre); | ||
console.timeEnd('printJson'); | ||
return obj; | ||
} |
This file was deleted.
Oops, something went wrong.