{"id":19522227,"url":"https://github.com/captaincodeman/go-poly-tenant","last_synced_at":"2025-02-26T00:47:11.005Z","repository":{"id":66357878,"uuid":"66505502","full_name":"CaptainCodeman/go-poly-tenant","owner":"CaptainCodeman","description":"Go + Polymer MultiTenancy on AppEngine","archived":false,"fork":false,"pushed_at":"2016-09-06T22:29:23.000Z","size":54,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-08T14:15:31.645Z","etag":null,"topics":["appengine","polymer","polymer-multitenancy","tenant"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CaptainCodeman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-24T22:53:54.000Z","updated_at":"2023-12-18T20:14:20.000Z","dependencies_parsed_at":"2023-02-23T04:16:02.083Z","dependency_job_id":null,"html_url":"https://github.com/CaptainCodeman/go-poly-tenant","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptainCodeman%2Fgo-poly-tenant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptainCodeman%2Fgo-poly-tenant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptainCodeman%2Fgo-poly-tenant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CaptainCodeman%2Fgo-poly-tenant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CaptainCodeman","download_url":"https://codeload.github.com/CaptainCodeman/go-poly-tenant/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240771906,"owners_count":19854982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appengine","polymer","polymer-multitenancy","tenant"],"created_at":"2024-11-11T00:37:49.874Z","updated_at":"2025-02-26T00:47:10.983Z","avatar_url":"https://github.com/CaptainCodeman.png","language":"HTML","readme":"# Go Polymer MultiTenancy\n\nAn example of using server-side Go templating to serve a multi-tenanted\nPolymer client using AppEngine. Each client could be served from it's own\ncustom domain or using a CNAME from a root service (e.g. tenant.service.com).\n\nExamples:\n\n* https://red-dot-go-poly-tenant.appspot.com/\n* https://green-dot-go-poly-tenant.appspot.com/\n* https://blue-dot-go-poly-tenant.appspot.com/\n\nThe dummy tenants are generated via the `/app/warmup.go` file.\n\nYes, those are some funky URLs, the '-dot-' part is todo with how AppEngine\nprovides HTTPS for appspot.com domains. In reality you'd use a custom domain\nso you would have tenant URLs like red.myservice.com or www.red.com.\n\nThe index.html page and manifest.json file is generated dynamically for the\ndomain it's being served from. All other static files are served by the\nAppEngine frontend edge cache (like a CDN).\n\nCreating the index.html page from a template saves having to download the app\nand then make a separate request to get the runtime config for the tenant. We\nwant fast and zippy and no waiting to render. This could also be used to add\nadditional server-side meta-data for SEO, open-graph etc... by adding a little\nmore server-side routing to the mix.\n\nThe app config and tenant data (for use within the app) is set to the MyApp\nglobal object. It can contain additional config settings such as api, auth or\nimage endpoints.\n\n## Dependencies\n\nYou need to have\n\n* Go SDK for AppEngine\n* Polymer CLI\n\n## Setup\n\nThe `/app` folder contains the AppEngine application and also serves the polymer\nfrontend SPA from a static folder which uses a symlink to point to the regular\nPolymer-CLI build folder. Create it in the `/app` folder using:\n\n    $ ln -s ../build/unbundled static\n\n## Run Locally\n\nBuild the polymer app using `./build.sh`. This runs `polymer build` with the\nparameters to include the additonal files required (images and the webcomponent\npolyfill).\n\nStart the app locally by running `goapp serve` within the `/app` folder\n\nGo to one of the tenant sites:\n\n* http://red.127.0.0.1.xip.io:8080/\n* http://green.127.0.0.1.xip.io:8080/\n* http://blue.127.0.0.1.xip.io:8080/\n\nxip.io is a wildcard DNS service that can be used when developing locally.\n\n## Develop Locally\n\nI normally have the root index.html page set to use a dev tenant configuration.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptaincodeman%2Fgo-poly-tenant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaptaincodeman%2Fgo-poly-tenant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptaincodeman%2Fgo-poly-tenant/lists"}