flatiron / blacksmith

A generic static site generator built using flatiron, plates, and marked.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support http-server 0.4.x

gradus opened this issue · comments

Though using 'blacksmith preview works', however node./bin/server gives TypeError: undefined is not a function in ./bin/server:3. when using http-server >=0.3.0.

This causes a problem running 'jitsu deploy' with the dependency in package.json set for http-server as "*" which was until recently the default. I see it has been set to specifically 0.2.4 as of a few days ago.

The current version of http-server is 0.4.0 and dependency has to be set as "0.2.4" to deploy on nodejitsu or run locally using node./bin/server.

Simplifying ./bin/server to something like the following and using default port 8080 and public dir allows 'node ./bin/server to start the app locally with version 0.4.0 of http-server. Have not tested this with nodejitsu or am I sure this is a good way to do it.

var httpServer = require('http-server');

httpServer.start();

process.on('SIGINT', function() {
httpServer.log('http-server stopped.'.red);
return process.exit();
});

Hi there!

Yes, I noticed issues with v0.3.x myself, which is why I specified the latest 0.2.x release.

If 0.4.x works as-expected on nodejitsu, I would be happy to bump the http-server version.

Do not bump the http-server version. 0.4.x does not work on nodejitsu either.
Modifying the start script to the code I used above only works for me locally.
I will do my best to offer a pull request if I have the time to get this resolved before you do.
thanks for the response. Keep up the good work. I really like blacksmith. It's perfect for me.

Fixed by #52