Name: multitenant-prpl
Owner: PolymerLabs
Description: prpl-server as a library test
Created: 2017-06-02 22:08:40.0
Updated: 2017-06-02 22:22:54.0
Pushed: 2017-08-23 11:23:29.0
Homepage: null
Size: 55
Language: HTML
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Test of using PRPL as a library, serving two PSK-based apps from non-root URLs.
To use:
Clone this repo.
Install dependencies:
npm install
This also installs all of the bower dependencies for the two PSK apps.
Build:
npm run build
Serve:
npm run serve
Main app is available at localhost:8080. Subapps at localhost:8080/prpl/ and localhost:8080/haze/
Changes required to basic PSK setup:
Hardcode rootPath
to the app's logical mount point in each app's index.html
.
window.Polymer = { rootPath: '/prpl' }
Hardcode basePath
for each build in each app's polymer.json
.
"builds": [
{ "name": "modern", "preset": "es6-unbundled", "basePath": "/prpl/modern/" },
{ "name": "fallback", "preset": "es5-bundled", "basePath": "/prpl/fallback/" }
]
Note: if you're running prpl-server from the build directory, simply set
basePath: true
. You only need an explicit basePath
if you're using prpl-server
as a library and the server is not running in the build directory (like here, where
the server runs one level up.)