title: Access a file outside the current folder in Node.js
body: <p>I am trying to create a module for routing in Node.js inside a folder in the main server, like this.</p>
  <pre><code>+root.js (server main)
  +modulos (folder where rutas.js is)
      ++rutas.js
  +shalimar (folder where all the static files are)
      ++muestrame.html (I want to send this)
  </code></pre>
  <p>My code looks like:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>root.js (main server)
  
  var express = require('express');
  var router_app = require('./modulos/rutas');
  
  web.listen(4200, function() {
      console.log('Servidor Web Iniciado en el Puerto : 4200');
  });
  
  web.use(express.static(__dirname + '/shalimar'));
  
  web.use('/app', router_app);</code></pre>
  </div>
  </div>
  </p>
  <p>Here I call rutas.js inside modulos</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>rutas.js (inside modulos)
  
  var express = require('express');
  var router = express.Router();
  
  router.get('/', (entra, sale) =&gt; {
      console.log('Cargando desde routing.js');
      sale.sendFile('/shalimar/muestrame.html', {root : __dirname});
  });</code></pre>
  </div>
  </div>
  </p>
  <p>This error gets thrown:</p>
  <blockquote>
  <p>Error: ENOENT: no such file or directory, stat 'C:\Users\Eleazar Ortega\desktop\uneweb\modulos\shalimar\muestrame.html'</p>
  </blockquote>
  <p>My question is how to level up (outside modulos) in the folder to access <code>shalimar/muestrame.html</code></p>