All Projects → CaptainCodeman → go-poly-tenant

CaptainCodeman / go-poly-tenant

Licence: BSD-3-Clause license
Go + Polymer MultiTenancy on AppEngine

Programming Languages

HTML
75241 projects
go
31211 projects - #10 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to go-poly-tenant

Far-From-Home
A cross-platform mobile developed using Flutter and Firestore for House Rental Application with integrated payment module
Stars: ✭ 27 (+22.73%)
Mutual labels:  tenant
lvr
👓 Augmented Reality for everyone - Out of the world experiences
Stars: ✭ 92 (+318.18%)
Mutual labels:  polymer
Vidyano
Vidyano Web²
Stars: ✭ 29 (+31.82%)
Mutual labels:  polymer
mc-viewer
🌐🏠 A Web Component for visualizing Minecraft schematics
Stars: ✭ 25 (+13.64%)
Mutual labels:  polymer
resizable-panels
Web Component that allows to resize its childrens vertically or horizontally
Stars: ✭ 18 (-18.18%)
Mutual labels:  polymer
GAEPyPI
PyPI private package index on Google App Engine
Stars: ✭ 31 (+40.91%)
Mutual labels:  appengine
roller
Dice roller written in Go and Javascript to run on Google Appengine
Stars: ✭ 26 (+18.18%)
Mutual labels:  appengine
gae-vue-webapp2-starter
A simple GAE Vue Webapp2 starter project.
Stars: ✭ 17 (-22.73%)
Mutual labels:  appengine
node-red-contrib-polymer
A Polymer based Dashboard UI for Node-RED
Stars: ✭ 21 (-4.55%)
Mutual labels:  polymer
GitHunt-Polymer
An example of a client-side app built with Polymer and Apollo Client.
Stars: ✭ 13 (-40.91%)
Mutual labels:  polymer
jekyll-polymer
A material theme for Jekyll built with Polymer
Stars: ✭ 68 (+209.09%)
Mutual labels:  polymer
deploy-appengine
A GitHub Action that deploys source code to Google App Engine.
Stars: ✭ 184 (+736.36%)
Mutual labels:  appengine
polytimer
polytimer.rocks
Stars: ✭ 24 (+9.09%)
Mutual labels:  polymer
iron-swipeable-pages
[Polymer 1.x] Element that enables switching between different pages by swiping gesture.
Stars: ✭ 51 (+131.82%)
Mutual labels:  polymer
luceneappengine
This project provides a directory useful to build Lucene and Google App Engine powered applications
Stars: ✭ 16 (-27.27%)
Mutual labels:  appengine
obvi
A Polymer 3+ webcomponent / button for doing speech recognition
Stars: ✭ 54 (+145.45%)
Mutual labels:  polymer
identicon-avatar
👾 GitHub style identicon avatar
Stars: ✭ 15 (-31.82%)
Mutual labels:  polymer
page-title
A Polymer element for easily updating a webpage's title, such as in a SPA.
Stars: ✭ 13 (-40.91%)
Mutual labels:  polymer
BlazorEFCoreMultitenant
Examples of multitenancy using EF Core and Blazor.
Stars: ✭ 67 (+204.55%)
Mutual labels:  tenant
moment-js
A Polymer element to parse, validate, manipulate, and display dates using Moment.js.
Stars: ✭ 15 (-31.82%)
Mutual labels:  polymer

Go Polymer MultiTenancy

An example of using server-side Go templating to serve a multi-tenanted Polymer client using AppEngine. Each client could be served from it's own custom domain or using a CNAME from a root service (e.g. tenant.service.com).

Examples:

The dummy tenants are generated via the /app/warmup.go file.

Yes, those are some funky URLs, the '-dot-' part is todo with how AppEngine provides HTTPS for appspot.com domains. In reality you'd use a custom domain so you would have tenant URLs like red.myservice.com or www.red.com.

The index.html page and manifest.json file is generated dynamically for the domain it's being served from. All other static files are served by the AppEngine frontend edge cache (like a CDN).

Creating the index.html page from a template saves having to download the app and then make a separate request to get the runtime config for the tenant. We want fast and zippy and no waiting to render. This could also be used to add additional server-side meta-data for SEO, open-graph etc... by adding a little more server-side routing to the mix.

The app config and tenant data (for use within the app) is set to the MyApp global object. It can contain additional config settings such as api, auth or image endpoints.

Dependencies

You need to have

  • Go SDK for AppEngine
  • Polymer CLI

Setup

The /app folder contains the AppEngine application and also serves the polymer frontend SPA from a static folder which uses a symlink to point to the regular Polymer-CLI build folder. Create it in the /app folder using:

$ ln -s ../build/unbundled static

Run Locally

Build the polymer app using ./build.sh. This runs polymer build with the parameters to include the additonal files required (images and the webcomponent polyfill).

Start the app locally by running goapp serve within the /app folder

Go to one of the tenant sites:

xip.io is a wildcard DNS service that can be used when developing locally.

Develop Locally

I normally have the root index.html page set to use a dev tenant configuration.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].