imfunniee / gitfolio

:octocat: personal website + blog for every github user

Home Page:https://imfunniee.github.io/gitfolio/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'run' command doesn't work, events.js error

Prodyte opened this issue · comments

commented

image

I found this to be fixed by removing the spawn of a browser session. This is the minimal code for your own run.js (assuming your stuff is in dist/ and this is in the parent directory). You can use node run.js to run the webserver

const express = require('express');
const path = require('path');
const outDir = path.resolve('./dist/' || process.env.OUT_DIR);

const app = express();

app.use(express.static(`${outDir}`));

app.get('/', function(req,res) {
  res.sendFile('/index.html');
});

app.listen(8000, function() {
  console.log('running on port 8000');
});

On which OS are you?

Edit: I can see the debian sign in the image but is it plain debian or another debian-based distro?

commented

On which OS are you?

Edit: I can see the debian sign in the image but is it plain debian or another debian-based distro?

Plain debian

commented

I think the error is caused by this package that opens up the website on your default browser but chrome isn't able to open it . If you guys want i can remove that package and only output the port on which the website would be running and you can manually open it.

I'd definitely prefer it as it doesn't work on servers without monitors or browser installed

commented

The issue has been fixed in latest release v0.1.5 (hopefully feel free to re-open the issue if hasn't been) 😄🙌