trailsjs / trailpack-express

:package: Express Trailpack
MIT License
12 stars 15 forks source link

static assets #10

Closed weyj4 closed 8 years ago

weyj4 commented 8 years ago

Right now you serve up a static directory by putting the following in app.config.main.paths: www: path.resolve(__dirname, '..', 'dist')

Would it make sense to modify this configuration so that you only need to put: www: 'dist' ?

Right now trailpack-hapi uses something similar to the 2nd option above, and they need to both work the same. Is there a good reason to keep path.resolve in the main app?

jaumard commented 8 years ago

I didn't test with only dist I think, because in the default main config path.resolve is used https://github.com/trailsjs/trails/blob/master/archetype/config/main.js so I use same :) I don't know if only dist will work directly with the current code, need some tests depends of what way you choose

weyj4 commented 8 years ago

OK. It won't work with only dist now, we'd have to modify the trailpack. It sounds like it might be easiest to leave this as-is and modify trailpack-hapi to use path.resolve. Thanks!