title: Koa - error, file not found - when html and css are in different folders
body: <p>I am not able to set simple Koa server, so it would allow me to have index.html and css files in different folders. Also as next step i want to have many js files in different folders. I do not know Koa. Please be so kind to provide help.</p>
  
  <p>I have tried to use mount as shown in <a href="https://stackoverflow.com/questions/31369227/can-i-have-koa-static-serve-assets-at-a-custom-e-g-static-path">Can I have koa-static serve assets at a custom (e.g., /static/) path?</a> but it did not work</p>
  
  <pre><code>const path = require('path');
  const Koa = require('koa');
  const koaStatic = require('koa-static');
  const getPort = require('get-port');
  
  async function runServer() {
      const port = await getPort({ port: 3000 });
  
      const app = new Koa();
      app.use(koaStatic(path.join(__dirname, '..', 'src/static')));
      app.use(koaStatic(path.join(__dirname, '..', 'src/styles')));
  
      app.listen(port);
  
      console.log(`server started at http://localhost:${port}/`);
  }
  
  runServer().catch(console.error);
  </code></pre>
  
  <p>I got following error: GET <a href="http://localhost:3000/src/styles/vendor.css" rel="nofollow noreferrer">http://localhost:3000/src/styles/vendor.css</a> net::ERR_ABORTED 404 (Not Found)</p>
  
  <p>My file structure is as follow:
  MyProject -></p>
  
  <pre><code>src-&gt; components (header.component.js, footer.component.js)
  src-&gt; services (service.js)
  src-&gt; assets (data.json)
  src-&gt; scripts (some-js-files.js)
  src-&gt; styles (styles.css)
  src-&gt; static (index.html) 
  </code></pre>
  
  <p>I expect the app to work on localhost:3000 and recognize all paths</p>