KO
|
EN
gitlite โ search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
pineapple.js
โ 9
Open GitHub โ
No description available.
Download README (.md)
Explore Similar Repositories
shuggle
:
SHU
AR_Mobile_Fishing_Game
:
AR Mobile Fishing Game ๐ฌ with NFT
SkyR6M
:
Moderation & Rainbow 6 Mobile Match Making Based Bot Using discord.js v14 & Advanced Permission Handler NOT FOR COMMERICAL USE.
imagejam.net
:
No description available.
GraphWOZ
:
No description available.
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
pineapple.js
?
Download (.md)
[](https://www.npmjs.com/package/@snapshot-labs/pineapple) # Pineapple.js Blazing fast IPFS JSON pinning with replication on multiple pinning services. ### Install Pineapple.js was designed to work both in the browser and in Node.js. #### Node.js To install Pineapple.js on Node.js, open your terminal and run: ``` npm install @snapshot-labs/pineapple ``` #### Browser You can create an index.html file and include Pineapple.js with: ```html <script src="https://cdn.jsdelivr.net/npm/@snapshot-labs/pineapple"></script> ``` ### Usage ```js import { pin } from '@snapshot-labs/pineapple'; // Pin JSON const obj = { foo: 'bar' }; const receipt = await pin(obj); console.log(receipt); ``` On success, it returns a receipt object: ```js { provider: 'infura', cid: 'xxxxx' } ``` On error, it will return an error object like this: ```js { error: { code: 400, message: 'File too big', data: {} } } ``` ### Notes - On NodeJS, you can set the env variable `FETCH_KEEP_ALIVE` to `true` to enable keep-alive connections. - Functions have a timeout of 10s. ### License [MIT](LICENSE).