1
0
Fork 0
mirror of https://github.com/dilllxd/gitfolio.git synced 2024-08-14 22:28:09 +00:00
gitfolio/run.js
imfunny 6fb6408534
v0.1.3
-added cli support (thanks @rohit-smpx)
-arguments for fork
-you can now sort and order repos
-fixed bugs
2019-05-23 15:27:23 +05:30

25 lines
No EOL
587 B
JavaScript

const express = require('express');
const open = require('open');
const defaultBrowser = require('x-default-browser');
const app = express();
app.use(express.static(__dirname + '/dist'));
function runCommand(){
app.get('/',function(req,res){
res.sendFile('/index.html');
});
app.listen(3000);
defaultBrowser(function (err, res) {
if(err) throw err;
(async () => {
await open('http://localhost:3000', {app: res.commonName});
console.log("ctrl + c to exit");
})();
});
}
module.exports = {
runCommand
};