title: Add css background image in node.js using express
body: <p>I am experimenting with Node.js and am a complete new bee.. Haven't been able to find an answer.  My directory structure is </p>
  
  <p>app --> public --> a.jpg &amp; style.css</p>
  
  <p>I provide access to these files in express as follows: </p>
  
  <pre><code>var express = require("express");
  var app = express();
  var PORT = 3000;
  app.use(express.static("./app/public"));
  </code></pre>
  
  <p>The css works, but when i call the background-image property in the style sheet it is unable to find the image and apply it. I have tried the following combinations with no luck:</p>
  
  <pre><code>body{
      background-image: "../app/public/a.jpg";
      background-image: "./app/public/a.jpg";
      background-image: "/app/public/a.jpg";
      background-image: "/public/a.jpg";
      background-image: "./public/a.jpg";
      background-image: "/a.jpg";
      background-image: "a.jpg";
  }
  </code></pre>
  
  <p>can someone point me in the right direction. </p>