Sharing common code between services with Appengine Flex

101 views
Skip to first unread message

Spencer Whitt

unread,
Mar 22, 2017, 5:02:04 PM3/22/17
to Google App Engine
I'm using this file structure for my services: https://cloud.google.com/appengine/docs/flexible/nodejs/configuration-files

But since each service has its own directory, I'm not sure how to share common code between them. I tried creating symbolic links without success - when deployed the app cannot find the common files. Does anyone know a good solution to this problem?

Jordan (Cloud Platform Support)

unread,
Mar 24, 2017, 4:51:33 PM3/24/17
to Google App Engine
Your web application is the combination of all of your individual services. Each service is its own separate application that has its own resources and code. 

Services can communicate to each other via API Endpoints.  You can also use any product like Pub/Sub that uses URLFetch/HTTP Requests to communicate between Services (just as long as your Services have URL Handler/Endpoints to accept the incoming requests). 

Additionally if you want your Services to share static content, you should store this content in Google Cloud Storage and have each Service connect to Cloud Storage to get the content. 
Reply all
Reply to author
Forward
0 new messages