web3.db-fileconnector
Version:
GraphQL System Built on web3 technologies. Web3.DB is an open database built on top of web3 technologies. It is a decentralized, open-source database that allows users to store and query data in a secure and efficient manner. The system is designed to be
21 lines (18 loc) • 572 B
JavaScript
// Prefixed with /api/ceramic/
export default async function (server, opts) {
server.get("/local/status", async (req, res) => {
try {
const local_healtcheck_url =
"http://localhost:7007/api/v0/node/healthcheck";
const response = await fetch(local_healtcheck_url);
if (response.status !== 200) {
return res.internalServerError(await response.text());
}
return {
status: "OK",
};
} catch (e) {
return res.notFound("There are no Ceramic nodes running locally.");
}
});
}