gabrielcsapo / gabrielcsapo/node-git-server
Adding path to repo
- 主要语言
- 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 中的 Express 使用示例和报告的错误 `url_1.default.parse(req?.url || '')` 开始。跟踪相关的入口点并验证受支持的 Node.js 运行时;当文档中的 Express 设置能够在不出现所报告的语法错误的情况下运行时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- express, nodejs, typescript
- 领域
- backend
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100