title: How to create a simple html server using express js
body: <p>I'm new in node.js I want to create a simple express.js static file server, but I have some issues.
  I have been installed express.js 4.2 globally like this:</p>
  
  <pre><code>npm install  -g express-generator
  </code></pre>
  
  <p>I have this code in httpsrv.js:</p>
  
  <pre><code>var http = require('http');
  var express = require('express');
  var app = express();
  
  app.use('/', express.static(__dirname + '/public'));
  app.listen(3000, function() { console.log('listening')});
  </code></pre>
  
  <p>I'm not sure is it ok  I guess it is not enough, but I cant run it it's failed with error: cannot find module 'express'.</p>
  
  <p>I want to create a simple http server which can serve from specific folder("\public" e.g.) and I'm using .html language. I found on the internet a many bullshit, I don't want to use this .jade thing and I don't want to create a empty web app with express etc. I want express.js http server which can operate like Apache and can serve a static html pages first from a specified folder.
  Can anybody help me on this, suggest a good article which is explain a step by step, because I'm beginner. </p>