A skeleton project for GAE/Go + Dart + Polymer.dart.
You can see the actual website on App Engine at http://gae-go-dart-skeleton.appspot.com/
-
Setup Google App Engine/Go environment.
-
Setup Dart enviroment.
-
Clone the repository.
-
Set GOPATH like the following
- For Windows:
<path to repository>\vendor;<path to repository>
- For Linux:
<path to repository>/vendor:<path to repository>
- For Windows:
-
Execute
goapp get google.golang.org/appengine
in repository root. -
Execute
pub get
insidesrc/web
directory to get packages. -
Execute
goapp serve
at the repository root to start a local server, and accesshttp://localhost:8080/
with Dartium to check if it's working. -
Execute
pub build
insidesrc/web
directory to convert dart files to JavaScript. You will have to change theapp.yaml
handlers according to which files you want to serve withgoapp
. You will also have to change the root directory path inmain.go
.-
Handler for dev server
- url: /(.*\.dart) static_files : web/web/\1 upload: web/web/(.*\.dart)
-
Handler for deployed server (after pub build)
- url: /(.*\.js) static_files : web/build/web/\1 upload: web/build/web/(.*\.js)
-
root directory for dev server
rootDirectory string = "web/web"
-
root directory for deployed server (after pub build)
rootDirectory string = "web/build/web"
-
-
Change the application ID inside app.yaml to an ID that matches your own app ID, and execute
appcfg.py update .
insidesrc
to upload to App Engine.
Contains the Go backend code for the server.
Contains the Dart frontend code for the client.
Contains all web components used in the web app.
Contains all external Go packages. The GOPATH must be set correctly for this directory to work properly. This directory is empty at the beginning, and external code + libraries will be created by goapp
after goapp get
.