I try to do something like this:
var main = express();
main.use(express.static(path.resolve('./asset')));
main.route('someroute', someHandle);
var app = express();
app.use(express.static(path.resolve('./asset')));
app.route('someroute', someHandle);
main.use('/app', app);
assets /asset/someasset.js served well, but /app/asset/someasset.js not returned (404), paths resolving to right folders.
I tried app.use('/app', express.static(path.resolve('./asset'))); - not work, but main.use('/app', express.static(path.resolve('./asset'))); - works!
Is there some limitation to use express.static with mounted subapp?
UPD:
I try use mounted app as described in http://expressjs.com/ru/4x/api.html#express app.mountPath expecting that all features of express mounted as sub application should work in it, and as stumbled on static problem i would like to know is there are limitations in this use case? and what they could be?
Your use case looks like a good candidate for Express Router, which is "an isolated instance of middleware and routes":
http://expressjs.com/4x/api.html#router
Specifically, try replacing
with