Netzo SDK
Software development kit (SDK) for Netzo, the open platform to instantly deploy JavaScript and TypeScript to URL endpoints, connect essential APIs, automate business processes and build internal tools faster, without managing servers.
Documentation
Refer to the Netzo documentation for more details.
Installation
Deno
import { Netzo } from "https://deno.land/x/netzo/mod.ts";
Node
npm install @netzoio/sdk
Browser
<script type="module">
import * as NetzoSDK from 'https://esm.sh/@netzoio/sdk?bundle'
window.NetzoSDK = NetzoSDK
</script>
Usage
const netzo = Netzo({ apiKey: NETZO_API_KEY });
// api:
const services = await netzo.api.services.get();
// request:
const request = netzo.request({ url: "https://jsonplaceholder.typicode.com/todos" });
const todos = request.invoke();
// service:
const service = await netzo.service(SERVICE_ID);
const users = service.users.get();
// createClient:
const client = netzo.createClient({ baseURL: "https://jsonplaceholder.typicode.com" });
const todos = await client.todos.get();
Project Structure
.
├─ .github/
│ └─ workflows/
│ └─ ci.yml
├─ .vscode/
│ └─ extensions.json
│ └─ settings.json
├── src/
├─ .gitattributes
├─ .gitignore
├─ CHANGELOG.md
├─ LICENSE
├─ mod.ts
├─ mod.test.ts
├─ types.ts
└─ README.md
.github
: repository settings for GitHub.vscode
: workspace settings for VSCode (apply when the workspace is opened)src/
: main directory where source code is locatedmod.ts
: entry point for the main modulemod.test.ts
: simple test for the main module entry pointmod.ts
types.ts
: entry point for TypeScript types.gitattributes
: a simple text file that givesattributes
to pathnames.gitignore
: specifies which files git should not track (not maintain a version history for)CHANGELOG.md
: a curated, chronologically ordered list of notable changes for each version of a project (format based on Keep a Changelog, this project adheres to Semantic Versioning)LICENSE
: license for the projectREADME.md
: text file containing useful reference information about the project
The filename mod.ts doesn’t come with any preconceived notions about how it might work. Deno does not treat
index.(js|ts)
in a special way.mod.(js|ts)
is prefered overindex.(js|ts)
to avoid confusion of wether the filename can be left out of the module specifier.
Each module should come with its test as a sibling with the name
modulename.test.(js|ts)
. For example the modulefoo.(js|ts)
should come with its siblingfoo.test.(js|ts)
.
License
Copyright (c) 2022 Netzo
Licensed under the MIT license.