The server for static JSON documents.
This API server is designed to be used in the development stage. It is not intended for production use.
- Put JSON document in
/data/:domainName/
, wheredomainName
is the domain name of your website. For example if you're using a site calledexample.com
, then put JSON data in/data/example.com
. You can use HTTP GET method to fetch data from this API server. - Run the application by executing
node app.mjs
from command line. - Use the API client to interact with the server.
- The API will respond with JSON data.
- Node.js
- Express.js
// Fetch API data
const response = await fetch("http://localhost:3100");
// Parse JSON data
const data = await response.json();
// Print API data
console.log(data);