gabrielcsapo / gabrielcsapo/node-git-server

Adding path to repo

オープン
#92 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
262
フォーク
81
PR マージ指標
30日以内にマージされた PR はありません

説明

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 ?

_Originally posted by @esp10mm in https://github.com/gabrielcsapo/node-git-server/issues/58#issuecomment-522491841_

I am getting errors like :
const u = url_1.default.parse(req?.url || '');
^

SyntaxError: Unexpected token '.'

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。