
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
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.
The npm package forgeapi receives a total of 0 weekly downloads. As such, forgeapi popularity was classified as not popular.
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.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.