Skip to content

star-inc/miniaqua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniaqua

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.

Usage

  • Put JSON document in /data/:domainName/, where domainName is the domain name of your website. For example if you're using a site called example.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.

Dependencies

  • Node.js
  • Express.js

Client code

// Fetch API data
const response = await fetch("http://localhost:3100");

// Parse JSON data
const data = await response.json();

// Print API data
console.log(data);

About

The server for static JSON documents.

Resources

License

Stars

Watchers

Forks