We have been creating an API using Serverless.com
Here is an example of our Serverless config file
service: hello-self-member-api
provider:
name: aws
# VAGRANTFILE_API_VERSION = "2" | |
# VAGRANT_DOMAIN_NAME = "dev.xmas.justgiving.com" | |
# VAGRANT_IP_ADDRESS = "192.168.33.62" | |
# Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# config.vm.box = "hashicorp/precise64" | |
# config.hostmanager.enabled = true | |
# config.hostmanager.manage_host = true |
app.directive('ggchrome', ['$http', '$q', '$timeout', | |
function($http, $q, $timeout) { | |
return { | |
link: function(scope, element, attr) { | |
var chromeBase = 'https://chrome.justgiving.com/clientonly/'; | |
var container = element; | |
var footer = ''; | |
var headcontent = ''; |
#!/bin/bash | |
#Database login credentials - need to be changed accordingly | |
dbHost="***" | |
dbName="**" | |
dbUser="***" | |
dbPass="***" | |
#How many days the backups should be kept for before being removed | |
keepBackupsFor="30" |
$(function(){ | |
var selector = '.some-class'; | |
$(selector).each(function(){ | |
var $element = $(this); | |
$element.addClass('some-other-class') | |
$element.addClass('and-another-class') | |
}) |
const express = require('express'); | |
const router = express.Router(); | |
const script = { | |
"setup": { | |
"initial_stage_id": "0", | |
"initial_scores": { | |
"money": 0, | |
"tomatoes": 0, |
person = input('Enter your name: ') | |
print('Hello', person) | |
while True: | |
response = input("I'm meeting Dave and Emma for pizza on Friday. Would you like to come, " + person + "?\n") | |
if response == "yes": | |
print("great! See you there") | |
break |