-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to create our own endpoints? #58
Comments
What would your custom endpoints do? |
List all repos, show info about repos, literally anything |
You can use it with express like following :
Is this what you want ? |
This is what groffee was supposed to be,
https://github.com/gabrielcsapo/groffee. This library was meant as a
backing library to build a GitHub like application.
…On Mon, Aug 19, 2019 at 2:34 AM esp10mm ***@***.***> wrote:
You can use it with express like following :
const path = require('path');
const express = require('express');
const app = express();
const Server = require('node-git-server');
const repos = new Server(path.resolve(__dirname, 'tmp'), {
autoCreate: true
});
const port = process.env.PORT || 7005;
app.use('/git', function(req, res) {
repos.handle(req, res)
});
app.listen(7005, () => {
console.log(`Express http server listening`);
});
Is this what you want ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#58?email_source=notifications&email_token=AAOE2W4Y2KMFYRP67MTFJRTQFJSLDA5CNFSM4IIFCT32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4SJPQI#issuecomment-522491841>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOE2WYVCSDN7G3N2BVA5QLQFJSLDANCNFSM4IIFCT3Q>
.
|
@esp10mm yes but i want to able to do that with the http server the git server is already running on... @gabrielcsapo since that lib isn't going switching to express may work... We could to server.express.get("/customroute", (req, res) => {}); |
Is it possible to create our own endpoints? If yes, how and if not, could you implement something like this?
The text was updated successfully, but these errors were encountered: