Integrating Theia in an Express app

I actually have 2 questions here:

  1. How do I put Theia in an existing Express/Node app?
  2. How do I limit Theia to one directory and it’s subdirectories?

I’m trying to build a staff organization app where each employee has a folder in a virtual filesystem, and I want to implement Theia to make the files in each employee’s space editable by only that employee (hence restricting Theia to one directory).

I don’t think you can practically embed Theia in an Express app, or it will be with much trouble.

You might be able to proxy HTTP/WS requests from your Express app to the Theia backend process?

Theia by default uses the OS filesystem APIs, without any filtering mechanism that I know of. So I think a way forward to restrict access would be to start the Theia process with your user’s uid/gid and make sure that your file tree has the correct rights as well.