Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

My First Playground

node v8.17.0
version: master
endpointsharetweet
This is a playground to test JavaScript. It runs a completely standard copy of Node.js on a virtual server created just for you. Every one of npm’s 300,000+ packages are pre-installed, so try it out:
const fs = require('fs'); // Create a file, so we can read it. fs.writeFileSync('/tmp/CatWorried1.jpg', "this is a text about a worried cat..."); // To add image to post var FormData = require('form-data'); var formData = new FormData(); // Fill the formData object formData.append('dum', 'dum'); // load picture image formData.append('my_file', fs.readFileSync('/tmp/CatWorried1.jpg')); var aBuff=formData.getBuffer();
Loading…

no comments

    sign in to comment