deta-space-client
v2.2.2
Published
Access the Deta Space API from Node.js
Downloads
13
Readme
Deta Space Client
An fetch function for deta space
Usage
See the Authentication Doc for more information on how to get your access token.
import { fetchFn } from "deta-space-client";
// Provide your access token
const fetchFromSpace = fetchFn(process.env.DETA_SPACE_TOKEN);
fetch("/instances").then((response) => {
console.log(response);
});
CLI
space-client <command>
Commands:
index.js get <endpoint> Do a GET request
index.js post <endpoint> Do a POST request
Options:
--version Show version number [boolean]
--access-token The space access token [string]
--help Show help [boolean]