using nodegit within angularjs app - node.js

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?
Is there a way to run a node script from angular?
Is there a way to use nodegit from angular itself?
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

Related

How do I deploy a GWT website without Google App Engine? Is it possible to use GitHub Pages?

The Issue
Hi, I made a GWT (Google Web Toolkit) website, but now that I am done, I'm not sure how to host the website.
The code is only client-side, so I'm not sure where the problem is.
I would be grateful for any advice on where and how to host a GWT website.
Here's the GWT app on GitHub: https://github.com/aryanka15/GWTCledgeTextParser
My attempt to use GitHub Pages: https://github.com/aryanka15/aryanka15.github.io
What I tried:
I tried using GitHub Pages, but it doesn't work, for some reason the JS file is not recognized by browsers or something like that.
The build Java with Ant Github Action doesn't work either.
I also tried using Google App Engine, but it is a very complicated process that I couldn't get working, and I would like to avoid it if possible.
Also, I used VSCode to develop the application, if that helps. I think that many of the Google App Engine plugins for IDE's like Eclipse are deprecated, but let me know if I'm wrong.
Thank you!
Nvm, I wasn't being very smart. I just had to change the html to index.html, make necessary adjustments in the js files, and added all the files inside war to GitHub with the same file structure.

How to add PAYTM gateway integration in react js web application?

I got it working from here https://github.com/paytm/paytm-pg-node-sdk-sample/blob/master/javascript/DemoApp.js I used this in express and it is working but now I want do it from react and payment has to be done from frontend.
I was also wondering how I can do that, then I tried the youtube video mentioned by Robokishan, But I found that things were not that good. As we use Reactjs we don't want to redirect our user to another page. So I contacted the Paytm dev support team and they suggested js checkout solution.
Let me go through the steps you can use to implement it in your react app
You have to create a transaction token in your backend. This link will help you with that: https://developer.paytm.com/docs/api/initiate-transaction-api/
Then go to this GitHub repo https://github.com/paytm/paytm-blink-checkout-react just download it and extract it here you will find two folders 1st named lib and 2nd example. You don't need the lib folder as you can install that package from npm so just ignore it.
Now install the package mentioned above in your react project https://www.npmjs.com/package/paytm-blink-checkout-react
Now to go that download repo go to example/src/component/app.js here you will find all the codes you need to implement Paytm gateway in your code just copy it and modify it as your need
Please feel free to suggest some improvement or if you have any other better solution
You can use paytm blink checkout solution as you already integrated node sdk for backend.
Please refer the link blink checkout available on developer section of paytm.
Sample code for react is available on github for blink checkout.
https://github.com/paytm/paytm-blink-checkout-react

Can I deploy a MERN app whose both frontend folder and backend folder are on the same Github repo?

so its my first time deploying an app, I have googled a lot and tried a lot but was not quite able to find the answer. I have a github repo https://github.com/JokubasTolocka/Movie_app which has both frontend and backend folders. During many tries, I have deployed a github page for frontend and everything works as long as I run the backend locally. Whenever I shut down my VScode the github deployments page returns 404 not found. How can I deploy my backend so that I can use this project in my portfolio? Any help would be MUCH appreciated!
I am also a beginner and was in the same situation, I still want to know how to deploy from the same repo.
I did a quick workaround for my case:
I separated both the into different repositories using git subtree command,
Check step-by-step instructions here:
Detach (move) subdirectory into separate Git repository
Any further help on this question will be appreciated.

Compiled Node.Js app links to github, possible to redirect to different repository?

I have an app that I use that uses a repository on github. The app is compiled and I cannot edit it, is it possible to redirect the github request to another repository? Like to intercept the request? I am interested in making some changes.
Thanks
Hum... if you can't access to the source code it seems undoable.
But maybe a weebhook on your repository can do the job :
https://developer.github.com/webhooks/

create a GitHub repository from node-js

I want to be able to create a GitHub repository and to be able to commit and push from my NodeJS application.
I have searched a lot for a working example but I haven't found it yet.
Can anyone recommend libraries with documentation I can look at?
Thanks!
Can the Github api help you?
You can find the nodejs library such as this one
You'll need a Github client written for Node. https://github.com/mikedeboer/node-github looks pretty solid, as it covers most of the API. Here's a sample documentation link: http://mikedeboer.github.io/node-github/#repos.prototype.create

Resources