Backtrack Backtrack - 5 months ago 20
Node.js Question

Run nodejs static website

I am new to static web page generators and node js. I have followed this link https://github.com/jnordberg/wintersmith. I have successfully created and build a project using

wintersmith build


It has created a build folder and created some html files. The problem is i have hosted this directly in IIS also and run it manully by opening the .html files in browser. But it is not loading the proper page and when i click any hyper link on the page i am getting
404
eventhough the pages are available.

I suspect that i have to run this in a server. But i am not sure how?

Answer

You can use this module. Install it via npm and simply run

http-server <path>

where is the path to the folder where your index.html is located.