简体   繁体   中英

How can I load my Aurelia app from an index.html which is not located in the same folder as the rest of the application?

How can I load my app from an index.html which is not located in the same folder as the rest of the application?

I'm currently using jspm (which I'm new to). I'm trying to integrate Aurelia with web2py (Python web framework).

My index.html in accessible via

http://websiteaddress.com/myapp/default/index.html

and may later be accessible via

http://websiteaddress.com/myapp/index.html

but the code of my Aurelia app is accessible from

http://websiteaddress.com/myapp/static/aurelia_app/

On the disk the index.html file is at

/web2py/applications/myapp/views/default/index.html

and the Aurelia app folder is at

/web2py/applications/myapp/static/aurelia_app

You need to use the web2py pattern router , something like this in the router definition should work:

routes_in = (
  ('/appname/default/index', '/appname/static/aurelia_app/index.html'),
  ('/appname/default/jspm_packages/$anything', '/appname/static/aurelia_app/jspm_packages/$anything'),
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM