This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python ../httpsserver.py | |
# in your browser, visit: | |
# https://localhost:4443 | |
from http.server import HTTPServer, SimpleHTTPRequestHandler | |
import ssl | |
httpd = HTTPServer(("localhost", 4443), SimpleHTTPRequestHandler) | |
httpd.socket = ssl.wrap_socket (httpd.socket, certfile="../httpsserver.pem", server_side=True) | |
httpd.serve_forever() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////////////////////////// | |
// | |
// This javascript code queries a Google Cloud BigQuery database | |
// | |
// Prerequisites: | |
// 1. Setup a service account (Bigquery.admin) by following the below link | |
// https://cloud.google.com/video-intelligence/docs/common/auth#set_up_a_service_account | |
// 2. create a folder adminkey on the path of the javascript and save the service account json file | |
// 3. Execution in NodeJS | |
// npm install --save @google-cloud/bigquery |