diff --git a/public/assets/images/poster.jpg b/public/assets/images/poster.jpg new file mode 100644 index 0000000..13fdda2 Binary files /dev/null and b/public/assets/images/poster.jpg differ diff --git a/public/assets/images/poster.psd b/public/assets/images/poster.psd new file mode 100644 index 0000000..890662a Binary files /dev/null and b/public/assets/images/poster.psd differ diff --git a/public/index.html b/public/index.html index bf89246..354b79c 100644 --- a/public/index.html +++ b/public/index.html @@ -7,6 +7,22 @@
Welcome to SampleAPIs. A playground for messing with RESTful endpoints. Checkout the project on - GitHub and consider contributing to the project with a new endpoint!
-You can use any HTTP verbs (GET, POST, PUT, PATCH and DELETE) and access your resources from anywhere using - CORS and JSONP.
+ GitHub and consider contributing to the project with + a new endpoint! +You can use any HTTP verbs (GET, POST, PUT, PATCH and DELETE) and access your resources from anywhere + using CORS and JSONP.
The data on this site is for educational purposes only and is not owned by SampleAPIs.com
The data on this site will be reset on a regular basis.
diff --git a/server.js b/server.js index 628be33..9cd876f 100644 --- a/server.js +++ b/server.js @@ -6,6 +6,21 @@ const middleware = jsonServer.defaults(); const port = process.env.PORT || 5000; const pages = ["futurama", "avatar", "baseball", "recipes", "fakebank"]; +server.get("/reset", (req, res) => { + pages.forEach(page => { + fs.copyFile( + `./${page}/${page}.json.backup`, + `./${page}/${page}.json`, + err => { + if (err) { + console.error(err); + } + } + ); + }); + res.end("ok"); +}); + server.use(middleware); pages.forEach(page => {