mirror of
https://github.com/pomber/git-history.git
synced 2024-11-26 08:35:07 +03:00
22 lines
335 B
JavaScript
Executable File
22 lines
335 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const runServer = require("./server");
|
|
const fs = require("fs");
|
|
|
|
let path = process.argv[2] || "./.";
|
|
|
|
if (path === "--help") {
|
|
console.log(`Usage:
|
|
|
|
githistory some/file.ext
|
|
`);
|
|
process.exit();
|
|
}
|
|
|
|
if (!fs.existsSync(path)) {
|
|
console.log(`File not found: ${path}`);
|
|
process.exit();
|
|
}
|
|
|
|
runServer(path);
|