You'll need Node.js
installed on your local system for this example.
Create a new directory and use npm to create a new project:
NPM will ask a few questions about your project and create a package.json file.
2. Add the axios HTTP client to your project dependencies.
Install the latest version of the axios package:
3. Create a file called upload.js and open it with your code editor.
Below is the code we need to upload a file and pin it on the Storj IPFS pinning service.
Paste in the code below and read through it. Feel free to remove the comments - they're just there to highlight what’s going on.
4. Run your script with node.
You should now be able to run the script and give it the path to a file.
node upload.js path/file.extension