Reputation: 9043
I have an ember.js app (using CLI) that works great locally. When I pushed it up to my server at... www.thesite.com/subfolder (just sending up /dist) --- the files all get there, but the css and js href's are without the subfolder... This may very well be basic - and unrelated to ember... but I'm stumped... do I need to set a new root or something?
Locally I have ~ /sites/subfolder/files
(which includes "assets")
Remotely I have mysite.com/subfolder/files
(which includes "assets")
when viewing the remote I get: 404 for mysite.com/assets/app.css
instead of mysite.com/subfolder/assets/app.css
Upvotes: 0
Views: 420
Reputation: 191
I'm assuming you are using ember-cli, and want to host your ember app (including your assets, images, etc) from /subfolder instead of default /.
Change baseURL in config/environment.js { baseURL: '/subfolder', .... }
Now you can run your 'ember serve' and navigate to localhost:4200/subfolder, your ember app will fire up.
Also make sure you use relative path for all you assets linking.
Upvotes: 2