How do you read a file on Bitbucket using a Node.js script?

Hi guys.

I would like to know if there is any way to read the contents of a file located on a remote repo on Bitbucket from a Node.js script.

Appreciate any help as I’m new to Bitbucket. :slight_smile:

You should be able to do this using https://www.npmjs.com/package/bitbucket (API documentation can be found here: https://bitbucketjs.netlify.com)

2 Likes

Or you can use Axios/Request and the actual BitBucket API https://developer.atlassian.com/bitbucket/api/2/reference/resource/

1 Like