Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opensquare-network/ipfs
Ipfs client tools
https://github.com/opensquare-network/ipfs
Last synced: about 2 months ago
JSON representation
Ipfs client tools
- Host: GitHub
- URL: https://github.com/opensquare-network/ipfs
- Owner: opensquare-network
- License: apache-2.0
- Created: 2022-06-06T09:28:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-16T15:59:20.000Z (about 1 year ago)
- Last Synced: 2024-11-01T11:37:23.794Z (2 months ago)
- Language: JavaScript
- Size: 123 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# osn ipfs client
This is an IPFS client that provides a simplified API interface for uploading content to IPFS.
You can config the API to connect to Infura or a locally ipfs node by parameters.## Usage example
```javascript
const { getClients, ClientOptions, ClientMode } = require("@osn/ipfs");
const {
INFURA_PROJECT_ID,
INFURA_PROJECT_SECRET,
LOCAL_IPFS_NODE_URL,
USE_LOCAL_IPFS_NODE,
} = require("../env");const [ipfsClient] = getClients(
USE_LOCAL_IPFS_NODE ? ClientMode.Local : ClientMode.Infura,
new ClientOptions(
INFURA_PROJECT_ID,
INFURA_PROJECT_SECRET,
LOCAL_IPFS_NODE_URL
)
);```