-
Notifications
You must be signed in to change notification settings - Fork 8
Organize
GeorgeNava edited this page Jul 16, 2011
·
8 revisions
Your application will grow in no time, so it is better to be prepared from the beginning and organize it in folders according to their content:
/myapp
- /app <-- app.go
- /db <-- db.go
- /html <-- your html templates
- /media <-- your static content like images, video and audio
- /models <-- your entities and methods for data access
- /prg <-- all your go programs, views, handlers, utils, etc.
- /web <-- your static css and js files
This way is easier to tell app.Config where everything is so it can find the resources when it needs them. Static folders like media and web can be declared "static" in app.yaml so everything stored in them will be automatically served and cached by appengine.