Skip to content

Commit 9694783

Browse files
authored
Merge pull request #32 from jermbo/dev
Dev
2 parents d1a8cd7 + ca947c0 commit 9694783

File tree

4 files changed

+35
-3
lines changed

4 files changed

+35
-3
lines changed

public/assets/images/poster.jpg

32.4 KB
Loading

public/assets/images/poster.psd

153 KB
Binary file not shown.

public/index.html

+20-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
88
<title>Sample APIs</title>
99
<link rel="stylesheet" href="assets/styles/home-styles.css">
10+
11+
<!--FACEBOOK-->
12+
<meta property="og:title" content="Sample APIs">
13+
<meta property="og:site_name" content="Sample APIs">
14+
<meta property="og:url" content="https://sampleapis.com">
15+
<meta property="og:description" content="A playground for RESTful endpoints.">
16+
<meta property="og:image" content="https://sampleapis.com/assets/images/poster.jpg">
17+
<meta property="og:type" content="website">
18+
<!--TWITTER-->
19+
<meta property="twitter:card" content="A playground for RESTful endpoints.">
20+
<meta property="twitter:title" content="Sample APIs">
21+
<meta property="twitter:description" content="A playground for RESTful endpoints.">
22+
<meta property="twitter:creator" content="Jermbo">
23+
<meta property="twitter:url" content="https://sampleapis.com">
24+
<meta property="twitter:image" content="https://sampleapis.com/assets/images/poster.jpg">
25+
<meta property="twitter:image:alt" content="Sample APIs">
1026
</head>
1127

1228
<body>
@@ -15,9 +31,10 @@
1531
<div class="site__inner">
1632
<h1 class="site__title">Sample APIs</h1>
1733
<p>Welcome to SampleAPIs. A playground for messing with RESTful endpoints. Checkout the project on
18-
<a href="https://github.com/jermbo/SampleAPIs">GitHub</a> and consider contributing to the project with a new endpoint!</p>
19-
<p>You can use any HTTP verbs (GET, POST, PUT, PATCH and DELETE) and access your resources from anywhere using
20-
CORS and JSONP.</p>
34+
<a href="https://github.com/jermbo/SampleAPIs">GitHub</a> and consider contributing to the project with
35+
a new endpoint!</p>
36+
<p>You can use any HTTP verbs (GET, POST, PUT, PATCH and DELETE) and access your resources from anywhere
37+
using CORS and JSONP.</p>
2138

2239
<p class="disclaimer">The data on this site is for educational purposes only and is not owned by SampleAPIs.com</p>
2340
<p class="disclaimer">The data on this site will be reset on a regular basis.</p>

server.js

+15
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ const middleware = jsonServer.defaults();
66
const port = process.env.PORT || 5000;
77
const pages = ["futurama", "avatar", "baseball", "recipes", "fakebank"];
88

9+
server.get("/reset", (req, res) => {
10+
pages.forEach(page => {
11+
fs.copyFile(
12+
`./${page}/${page}.json.backup`,
13+
`./${page}/${page}.json`,
14+
err => {
15+
if (err) {
16+
console.error(err);
17+
}
18+
}
19+
);
20+
});
21+
res.end("ok");
22+
});
23+
924
server.use(middleware);
1025

1126
pages.forEach(page => {

0 commit comments

Comments
 (0)