How to create write stream into a google drive file system from web page javascript?

fs.createWriteStream only allow to write to a file in a local machine. How to directly create and write a csv file to google drive from a javascript of a webpage. How to open a path/stream between webpage javascript to a google drive.