
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
fastly-lib
Advanced tools
Dependencies-free client to interface with the Fastly API.
Node.js version 16 or greater
The simplest method is to use npm in your source code folder
npm install fastly-lib
Firstly and before to use the client, i strongly recommend reading the documentation about the Fastly API and our WiKi for a detailed description of each library method.
const fastlyLib = require('fastly-lib');
const fastly = new fastlyLib('your_api_key');
fastly.get('/public-ip-list')
.then((res) => {
// do something with the response.
})
.catch((err) => {
// something in case of error.
})
// Or use the method that corresponds to each action
fastly.post(...)
fastly.purge(...)
fastly.delete(...)
Or using helpers
// get a list of Fastly datacenters.
fastly.datacenters()
.then((res) => {
// do something with the response.
})
.catch((err) => {
// or something in case of errors.
})
fastly-lib also provides access to Fastly API functions through the following few methods
Configuration
| Method | Params | Description |
|---|---|---|
| .domains(service_id, version) |
service_id: String version: Number | [?] |
| .service() | None | [?] |
| .versions(service_id) | service_id: String | [?] |
Purging
| .purge(url) | url: String | Purge an individual URL [?]. |
| .purge_all(service_id) | service_id: String | [?] |
| .purge_by_key(service_id, key) |
service_id: String key: String | [?] |
| .purge_multiple(service_id, keys) |
service_id: String keys: Array of Strings | [?] |
| .softpurge(url) | url: String | [?] |
| .softpurge_by_key(service_id, key) |
service_id: String key: String | [?] |
Utilities
| .content(url) | url: String | List of URLs cached on each edge server.[?] |
| .datacenters() | None | List of Fastly datacenters[?] |
| .docs() | None | Gets all the Fastly API documentation. [?] |
| .public_ip_list() | None | Return the list of public IP addresses for the Fastly network. [?] |
Extra
| Method | Params | Description |
|---|---|---|
| .list_domains() | None | List of all domains associated with a Fastly account [?]. |
I'll be happy to hear your ideas or fix some bug. Please feel free to send me a message or create a new issue
fastly-lib is licensed under the MIT License © 2017-2019 luisan00
FAQs
API fastly client for Node.js
We found that fastly-lib 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.