Files
json-server/public/index.html
2014-03-19 15:13:36 +01:00

81 lines
1.8 KiB
HTML

<html>
<head>
<title>JSON Server</title>
<link href="//netdna.bootstrapcdn.com/bootswatch/3.1.1/flatly/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="stylesheets/style.css">
</head>
<body>
<div class="container">
<p>
<a href="https://github.com/typicode/json-server" class="logo">
<img src="images/json.png">
</a>
</p>
<hr>
<p>
<em>
Congrats! You're successfully running JSON Server.
</em>
</p>
<hr>
<h4>Routes</h4>
<p>
Here are the resources that JSON Server has loaded:
</p>
<p>
<ul id="resources">loading, please wait...</ul>
</p>
<p>
You can view database current state at any time:
<ul>
<li>
<a href="db">db</a>
</li>
</ul>
</p>
<p>
You can use GET, POST, PUT... and access your resources from anywhere
using CORS and JSONP.
</p>
<h4>Documentation</h4>
<p>
View
<a href="http://github.com/typicode/jsonserver">README</a>
on GitHub.
</p>
<h4>Issues</h4>
<p>Please go
<a href="https://github.com/typicode/jsonplaceholder/issues">here</a>.
</p>
<hr>
<p>
<i>To customize this page, just create a ./public/index.html file.</i>
</p>
</div>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script>
$(function() {
$.get('db').then(function(data) {
$('#resources').empty();
$.each(data, function(key, value) {
$('#resources')
.append('<li><a href="/'+ key + '">' + key + '</a></li>');
})
})
})
</script>
</body>
</html>