简体   繁体   中英

using nodegit within angularjs app

I am building an app in AngularJS that needs to clone GitHub wikis attached to GitHub repos. The GitHub API does not have functionality to do anything with the GitHub wikis and GitHub support suggested I could use libgit2. With that in mind, I found nodegit .

So, now I have nodegit installed, and I made a basic javascript file out of the code example they have for Cloning a repository and reading a file . I have that file, called nodegit.js, working and by navigating to the folder containing it and typing

node ./nodegit.js

The script runs great and clones the repo into the temp folder.

Fantastic.

Now...how can I use this script in my angularjs app?

  1. Is there a way to run a node script from angular?
  2. Is there a way to use nodegit from angular itself?
  3. Is there some other angular->github non-GitHub API script out there?

Any help greatly appreciated. I've gotten stuck on this one.

thank you,

Scott

Thanks shaunhusain. I ended up setting up an ExpressJS server via NodeJS and putting my code there and calling the ExpressJS server from my Angular app.

thanks, scott

Just wanted to add that I currently have a strong focus on getting the library running in the browser to address this use case. I'll update this comment once the code has landed. An issue to track the status is here:

https://github.com/nodegit/nodegit/issues/142

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM