Giter Site home page Giter Site logo

parking-lot-astra's Introduction

SensorsRUs MVP - Parking Lot Occupancy

This simple codebase allows one to connect to Datastax Astra and pull down specific query results for the number of open slots at a particular floor of a specific Parking Lot.

This github repo is setup to deploy continuously to Google Cloud Run and can be called like below:

Before running this sample, in your environment, make sure you have downloaded the secure connect bundle from your instance of Datastax Astra and saved in this folder as creds.zip

Interacting with the REST APIs

Look up Slots using this pattern http -v https://parking-lot-astra-ynv6tadumq-ue.a.run.app/slots/{parking_lot}/{floor_num}

http -v https://parking-lot-astra-ynv6tadumq-ue.a.run.app/slots/nasa_east/1

GET /slots/nasa_east/1 HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: parking-lot-astra-ynv6tadumq-ue.a.run.app
User-Agent: HTTPie/2.3.0



HTTP/1.1 200 OK
Alt-Svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Content-Length: 68
Date: Sun, 03 Jan 2021 21:20:23 GMT
Server: Google Frontend
X-Cloud-Trace-Context: 65cbc3a241aad091b5b59b6837cda159
content-type: text/html; charset=utf-8

Total slots available for FloorNum: 1 at Parking Lot nasa_east are 4

Deployment to Cloud Run:

  1. Create a container build by using Dockerfile:
gcloud builds submit --tag gcr.io/fe-shgupta/parking-lot-astra
  1. Deploy the container using Cloud Run:
gcloud run deploy --image=gcr.io/fe-shgupta/parking-lot-astra --platform=managed

parking-lot-astra's People

Contributors

sharadg avatar

Watchers

 avatar  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.