Skip to content

learning some sinatra and javascript and gcdatastore

Notifications You must be signed in to change notification settings

binamov/awesome_lookup_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

App Engine Flexible Environment - Cloud Datastore Sample

Application code

The sample application logs, retrieves, and displays visitor IPs. You can see that a visit is a Cloud Datastore entity of kind Visit, and is saved using the Dataset save method. Then, the ten most recent visits are retrieved in descending order by building a Query, and using the Dataset run method.

Run

Make sure gcloud is installed and authenticated. You can find your project id with gcloud config list.

export GOOGLE_CLOUD_PROJECT=<your-project-id>
bundle
bundle exec ruby ./app.rb

Deploy

gcloud app deploy

Test

Note: the tests do a live deploy to App Engine

Put a client_secrets.json file for a service account in the root of your repo.

gcloud auth activate-service-account --key-file ../../client_secrets.json
export TEST_DIR=appengine/datastore/
bundle exec rspec

About

learning some sinatra and javascript and gcdatastore

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published