Skip to content

Instantly share code, notes, and snippets.

View thoughtspeed7's full-sized avatar

Raj Chaudhary thoughtspeed7

View GitHub Profile
@thoughtspeed7
thoughtspeed7 / hello.py
Created June 5, 2018 15:31
Node, Python and Go in a single Google App Engine project!
# om namah shivay
from flask import Flask
from flask import jsonify
app = Flask(__name__)
@app.route('/')
def hello():
dictionary = {'message': 'Hello from Python!'}
@thoughtspeed7
thoughtspeed7 / go-app.yaml
Created June 5, 2018 15:23
Node, Python and Go in a single Google App Engine project!
# om namah shivay
# See https://cloud.google.com/appengine/docs/flexible/go/configuring-your-app-with-app-yaml
# and https://cloud.google.com/appengine/docs/flexible/go/reference/app-yaml for more info
runtime: go
env: flex
service: go
# The settings below are to reduce costs during testing and not appropriate for production use.
@thoughtspeed7
thoughtspeed7 / hello.go
Created June 5, 2018 15:11
Node, Python and Go in a single Google App Engine project!
// om namah shivay
package main
import (
"net/http"
"log"
"encoding/json"
)
@thoughtspeed7
thoughtspeed7 / app.yaml
Created May 23, 2018 13:57
Apollo GraphQL Server on Google App Engine in under 5 minutes!
# om namah shivay
# see https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml for more info
runtime: nodejs
env: flex
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
@thoughtspeed7
thoughtspeed7 / package.json
Last active May 23, 2018 17:38
Apollo GraphQL Server on Google App Engine in under 5 minutes!
{
"name": "apollo-graphql-server-google-app-engine",
"version": "1.0.0",
"description": "Apollo GraphQL Server on Google App Engine in under 5 minutes!",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Raj Chaudhary",
@thoughtspeed7
thoughtspeed7 / index.js
Created May 23, 2018 13:13
Apollo GraphQL Server on Google App Engine in under 5 minutes!
// om namah shivay
// see https://www.apollographql.com/docs/apollo-server/example.html for more info
const express = require('express');
const bodyParser = require('body-parser');
const { graphqlExpress, graphiqlExpress } = require('apollo-server-express');
const { makeExecutableSchema } = require('graphql-tools');
// Some fake data
@thoughtspeed7
thoughtspeed7 / index.js
Created May 17, 2018 16:22
CI / CD for AWS Lambda using GCP's Container Builder and Bitbucket!
// om namah shivay
exports.handler = (event, context, callback) => {
callback(null, 'Hello world! This is version 2.');
};
@thoughtspeed7
thoughtspeed7 / cloudbuild.yaml
Created May 17, 2018 16:20
CI / CD for AWS Lambda using GCP's Container Builder and Bitbucket!
# om namah shivay
secrets:
- kmsKeyName: projects/[PROJECT_ID]/locations/global/keyRings/[KEY_RING_NAME]/cryptoKeys/[KEY_NAME]
secretEnv:
AWS_ACCESS_KEY_ID: [BASE_64_ENCRYPTED_AWS_ACCESS_KEY_ID]
AWS_SECRET_ACCESS_KEY: [BASE_64_ENCRYPTED_AWS_SECRET_ACCESS_KEY]
steps:
@thoughtspeed7
thoughtspeed7 / index.js
Created May 17, 2018 13:43
CI / CD for AWS Lambda using GCP's Container Builder and Bitbucket!
// om namah shivay
exports.handler = (event, context, callback) => {
callback(null, 'Hello world! This is version 1.');
};
@thoughtspeed7
thoughtspeed7 / cloudbuild.yaml
Created May 17, 2018 13:16
CI / CD for AWS Lambda using GCP's Container Builder and Bitbucket!
# om namah shivay
steps:
# build the docker image
- name: gcr.io/cloud-builders/docker
args:
- build
- -t
- gcr.io/$PROJECT_ID/aws-cli