todomvc sample for gcloud-node
npm install gcloud-node-todos
1. Create a new cloud project on console.developers.google.com
2. Enable the Google Cloud Datastore API
3. Create a new service account and copy the JSON credentials to key.json
4. Export your project id:
``sh`
$ export PROJECT_ID=
#### Locally
`shSet your default Dataset
$ export DATASET_ID=$PROJECT_ID
#### Docker
`sh
Check that Docker is running
$ boot2docker up
$ export DOCKER_HOST=$(boot2docker shellinit)Build your Docker image
$ docker build -t app .Start a new Docker container
$ docker run -e DATASET_ID=$PROJECT_ID -p 8080:8080 appTest the app
$ curl -X GET http://$(boot2docker ip):8080
`#### Managed VMs
`sh
Get gcloud
$ curl https://sdk.cloud.google.com | bashAuthorize gcloud and set your default project
$ gcloud auth login
$ gcloud config set project $PROJECT_IDGet App Engine component
$ gcloud components update appCheck that Docker is running
$ boot2docker upDownload the Node.js Docker image
$ docker pull google/nodejs-runtimeRun the app locally
$ gcloud preview app run .
$ curl -X GET http://localhost:8080Deploy the app to production
$ gcloud preview app deploy .
$ curl -X GET http://$PROJECT_ID.appspot.com
``