Golang and appengine modules

Hi there,

I decided to choose golang + appengine to start a new startup project. Because I wanted to have a “webservices” approach in order to clarify responsibility and help with independant scalability, I thought modules should be the thing.

I basically want to host an app named “AAA” on appengine, accessing it through aaa.appspot.com.

I’d like to have, for instance:

-a rest api part (in order to be flexible and easily capable of letting a future ios/android app access the service): accessed via api.aaa.appspot.com/… or appsport.com/api/

-mobile part: for mobile devices frontend, With similar path patterns

-frontend: default frontend

-blog

-admin/analytics and so on…

i could not fogure ojt how to handle this. Despite uploading the dispatch.yaml and other modules .yaml files.

is there a trick here ? (I precise that I am trying to do this without having to manage instances, power, memory etc

All you have to do is write a web app and either use a seperate module for each sub-part or use subfolders within the same application, either will work. You can write your code as if you’d make a normal Go web-application except you’ll skip writing a main() function.

Which part exactly are you struggling with here ?

well, my problem is to find how to do proper routing to these modules via simple routing.
For exemple I’d like to have a go app for the api, which the frontend, mobile frontend as well as future mobile apps (ios/android) woumd send calls to… in prder to get information.

I was expecting to access the api modulr via appid.appspot.com/api (and of course redirect my own domain to this path)…

but I can’t. I can only access the default module.

oh and by the way, if i set in the dispatch.yaml file that i want to route traffic to “/api” to the api module, does it mean that is should route the traffic to appid.appspot.com/api to this modules handlers? and if for exemple i have a “loginHandler” for path “/login” does it mean that traffic to /api/login" is supposed to get catched or “login” ?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.