Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
koxy-js
Advanced tools
Run your serverless API flows and functions in 35 regions around the world from your front-end with real-time support
Readme
Koxy AI is a no-code platform helps you build your AI-powered serverless back-end served edge-close to users from 35 regions, and Koxy JS is a client library to integrate your Koxy back-end in your front-end.
npm install koxy-js
First go to Koxy AI platform, sign up and create your Koxy Cloudspace. You can create API flows and cloud functions in the platform and run them from your front-end as described below: (full docs)
import { koxyAPI } from 'koxy-js';
// Initialize (replace CLOUDSPACE_TOKEN with your Cloudspace token)
const api = new koxyAPI("CLOUDSPACE_TOKEN");
// Set request parameters
const parameters = {
"param1": "value1"
};
// Run API flow (replace "main" with the flow name you want to run)
const data = await api.run("main", parameters);
// Run cloud function
const functionData = await api.runFunction("function_name");
You can send parameters and headers to your API flows. example:
import { koxyAPI } from 'koxy-js';
// Initialize (replace CLOUDSPACE_TOKEN with your Cloudspace token)
const api = new koxyAPI("CLOUDSPACE_TOKEN");
// Set request parameters
const parameters = {
"param1": "value1"
};
// Set request headers
const headers = {
"customHeader": "headerValue"
};
// Run API flow (replace "main" with the flow name you want to run)
const data = await api.run("main", parameters, headers);
Currently, You can't send parameters or headers to cloud functions.
Real-time in Koxy AI is built on top of GunDB, It's decentralized and has no limits. After creating a Cloudspace in Koxy AI, you can go to Real-time channels from the sidebar to get your real-time ROOT_ID and manage your real-time channels. This feature is totally free with no limits at all.
import { koxyRealtime } from 'koxy-js';
// Setup real-time channel (You can get your root ID from your Cloudspace's tokens page)
const channel = new koxyRealtime(
"ROOT_ID",
"room_123"
);
// Put node to the channel and listen to it
channel.asyncPut("message_1694453447561", {
"message": "Hello friend",
"owner": "user_092",
"date": 1694453447561
}, function (data) {
console.log(data);
})
// Put node to the channel
channel.put("message_1694453447561", {
"message": "Hello friend",
"owner": "user_092",
"date": 1694453447561
});
// Listen to data changes in the whole channel
channel.on("room_123", function (data) {
console.log(data);
});
After creating your Cloudspace, go to API Flows from the sidebar, and create your first flow, just name it and you're good to go, then you can use the drag-and-drop builder to build your flow's functionality, when you're done your can save and deploy your flow to the cloud.
After creating your Cloudspace, go to Functions from the sidebar, and create your first function, just name it and you're good to go, now you code your cloud function, deploy it with one click and you can run it from your front-end.
Now you can run this function in the cloud from your front-end, example:
import { koxyAPI } from 'koxy-js';
// Initialize (replace CLOUDSPACE_TOKEN with your Cloudspace token)
const api = new koxyAPI("CLOUDSPACE_TOKEN");
// Run the function (replace "main_function" with your function name)
const data = await api.runFunction("main_function");
You can support us by reporting any issues you face here
Built with love by Kais Radwan.
FAQs
Run your serverless API flows and functions in 35 regions around the world from your front-end with real-time support
The npm package koxy-js receives a total of 3 weekly downloads. As such, koxy-js popularity was classified as not popular.
We found that koxy-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.