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
gcloud dns record-sets transaction start --zone=samplewebsite | |
gcloud dns record-sets transaction add -zone=samplewebsite --name="www.samplewebsite.pl" --ttl=300 --type=CNAME "c.storage.googleapis.com." | |
gcloud dns record-sets transaction execute --zone samplewebsite |
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
gcloud dns record-sets transaction start --zone=samplewebsite | |
# Transaction started [transaction.yaml]. | |
gcloud dns record-sets transaction add --zone=samplewebsite --name="samplewebsite.pl" --ttl=21600 --type TXT "google-site-verification=H6H-AdAqZBMUwopsm5T89oEALZdU5z751rLBd-j3jhM" | |
# Record addition appended to transaction at [transaction.yaml]. | |
gcloud dns record-sets transaction execute --zone=samplewebsite | |
# Executed transaction [transaction.yaml] for managed-zone [samplewebsite]. | |
# Created [https://dns.googleapis.com/dns/v1/projects/staticwebsitehosting/managedZones/samplewebsite/changes/1]. | |
# ID START_TIME STATUS |
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
gcloud dns managed-zones create samplewebsite --dns-name="samplewebsite.pl." --description="samplewebsite.pl" | |
# Created [https://dns.googleapis.com/dns/v1/projects/staticwebsitehosting/managedZones/samplewebsite]. |
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
const app = require('express')(); | |
app.get('/', (req, res) => { | |
res.send('Hello world!'); | |
}); | |
app.listen(80, () => { | |
console.log('App listening on port 80!'); | |
}); |
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
# To run interactive mode run | |
# docker-compose run --rm --entrypoint sh tutorial-app | |
# in order to run the up run | |
# docker-compose up | |
version: '3.7' | |
services: | |
tutorial-app: | |
image: node:11-alpine | |
ports: | |
- 80:80 |
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
<?php | |
class ApiCest | |
{ | |
public function tryApi(ApiTester $I) | |
{ | |
$I->sendGET('/'); | |
$I->seeResponseCodeIs(200); | |
$I->seeResponseIsJson(); | |
} | |
} |
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
# for mac | |
docker run -it -v $PWD:/app -w /app composer:1.7 require "codeception/codeception" --dev | |
docker run -it -v $PWD:/app -w /app php:7.2-alpine ./vendor/bin/codecept init api | |
# Use the following answers. Important! There is no trailing slash! | |
# > ? Where tests will be stored? (tests) tests/api | |
# > ? Start url for tests (http://localhost/api) http://localhost | |
# or alternatively if you are not yet fun of docker | |
# composer require "codeception/codeception" --dev | |
# ./vendor/bin/codecept init api |
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
#!/usr/bin/bash env | |
# for mac | |
docker network create testnet | |
docker run -d -p 8080:8080 --net testnet --name wiremock -v $PWD/tests/wiremock/mappings:/wiremock/mappings ekino/wiremock:2.7.1 | |
docker run -it -v $PWD:/app -w /app --net testnet php:7.2-alpine ./vendor/bin/codecept run | |
# Codeception PHP Testing Framework v2.4.5 | |
# Powered by PHPUnit 7.3.5 by Sebastian Bergmann and contributors. | |
# |
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
#!/usr/bin/env bash | |
# For mac | |
docker run -it -v $PWD:/app -w /app composer:1.7 require "codeception/codeception" --dev | |
docker run -it -v $PWD:/app -w /app php:7.2-alpine ./vendor/bin/codecept init api | |
# Use the following answers. Important! There is no trailing slash! | |
> ? Where tests will be stored? (tests) tests/api | |
> ? Start url for tests (http://localhost/api) http://wiremock:8080 | |
# At point we will create some bootstrap files, since we have one particular endpoint we would like to test simply edit |
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
curl -v http://localhost:8080/book/123 | |
curl -v http://localhost:8080/book/non-existing |
NewerOlder