
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
ForgeAPI, the best way to interact with your ForgeScript bot and it's server.
ForgeAPI, the best way to interact with your ForgeScript bot and it's server.
Download this npm package:
npm i forgeapi
Now, in your client initialization:
const { ForgeAPI } = require("forgeapi")
// I'll assume client, can be bot or anything else
const client = new ForgeClient({
...options // The options you currently have
extensions: [
new ForgeAPI({
port: number
authorization?: string | string[]
})
]
})
And voi-la, you now have ForgeAPI installed and loaded to your bot.
Note: if you add authorization you will have to assign in the headers
{
"authorization": "1 of the assigned keys you added"
}
Endpoint | Method | Has WS |
---|---|---|
/usage | GET | yes |
/commands | GET | yes |
/guilds | GET | yes |
/{guild.id}/leave | POST | no |
Now, in your client initialization:
const { ForgeAPI } = require("forgeapi")
// I'll assume client, can be bot or anything else
const client = new ForgeClient({
...options // The options you currently have
extensions: [
new ForgeAPI({
port: number
load: string // Here add the path to load the custom endpoints
authorization?: string | string[]
})
]
})
On /<path>/<fileName>
add this
const data = {
url: '/endpoint',
method: "HTTP Method",
auth?: boolean,
handler: async function (ctx) {
ctx.reply.end('Endpoint here!');
},
wsHandler?: async funtion (ctx){
ctx.ws.send('WebSocket here!')
}
}
module.exports = { data }
Note: your const must always be named data.
More about RouteOptions:
FAQs
ForgeAPI, the best way to interact with your ForgeScript bot and it's server.
We found that forgeapi demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.