title: Node/Express send static file on request
body: <p>I'm really new to node/express and I'm trying to understand how sending static files work. I managed to serve my index file, but I cannot serve other files as response of a GET request.</p>
  
  <pre><code>app.use(express.static(path.join(__dirname, '/client/build')))
  
  app.get('/', (req, res) =&gt; {
    res.sendFile(path.resolve(__dirname, '.', 'client/build/', 'index.html'))
    res.end()
  })
  
  app.get('/portfolio', (req, res) =&gt; {
    const person = req.query.name
    var filePath = __dirname + '/client/build/' + person + '/' + 'index.html'
    res.sendFile(filePath)
    res.end()
  })
  </code></pre>
  
  <p>I found similar questions but nothing seems to work.</p>
  
  <p>The request I send is:</p>
  
  <pre><code>fetch(`portfolio?name=${who}`)
  </code></pre>