Coder Social home page Coder Social logo

yolocation's Introduction

YoLocation

YoLocation is a sample project for using location data with Yo.

High level overview:

  • Written in Go (golang.org)
  • Uses Revel web framework (revel.github.com)
  • Autobuild docker container (mtsgrd/yolocation)

Try it out!

Send a Yo to STARBUCKSMAP to get a yoback link to the nearest Starbucks that's currently open.

To run your own instance, consider using a container-optimized Google Compute Engine image: https://cloud.google.com/compute/docs/containers/container_vms.

Howto

containers.yaml

$ cat > containers.yaml
version: v1beta2
containers:
- name: yolocation
  image: mtsgrd/yolocation
  ports:
  - name: http
    hostPort: [external port]
    containerPort: 8080
  env:
  - name: YO_API_URL
    value: http://www.justyo.co/yo/
  - name: YO_API_TOKEN
    value: string
  - name: GOOGLE_API_KEY
    value: string (must have Places API enabled)
^CTRL-D

$ gcloud compute instances create [new server name] \
    --project [project name]
    --image container-vm-v20140925
    --image-project google-containers
    --metadata-from-file google-container-manifest=containers.yaml
    --tags http-server
    --zone us-central1-a
    --machine-type f1-micro

Note: You must manually open the external port in the gcloud firewall.

Yo API Account

The Yo API account configuration determines the query used against the Google Places API. To configure the account to ping back the closest Starbucks location, use the following:

CALLBACK URL: http://[xxx.xxx.xxx.xxx]:9000/starbucks/

Version

0.1

License

MIT

Free Software, Hell Yeah!

yolocation's People

Contributors

mtsgrd avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.