curl -XPUT 'localhost:9200/answers?pretty' -H 'Content-Type: application/json' -d'
{
"mappings": {
"user": {
"_all": { "enabled": false },
"properties": {
"user": { "type": "integer" },
"choice": { "type": "keyword" }
}
This file contains 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
FROM mhart/alpine-node:7.9.0 | |
RUN apk update && apk add git | |
RUN mkdir /app | |
WORKDIR /app | |
COPY package.json /app | |
RUN npm install | |
COPY . /app | |
CMD ["npm", "run", "build"] |
This file contains 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
// ... | |
Starting Step #1 | |
Step #1: | |
Step #1: > foo@ build /app | |
Step #1: > npm run build:tower && ./node_modules/.bin/webpack | |
Step #1: | |
Step #1: | |
Step #1: > foo@ build:tower /app | |
Step #1: > ./node_modules/.bin/babel ./node_modules/redux-tower/src --out-dir ./node_modules/redux-tower/lib --ignore __tests__ |
This file contains 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
Starting Step #1 | |
Step #1: | |
Step #1: > foo@ build /app | |
Step #1: > ls ./node_modules/redux-tower && npm run build:tower && ./node_modules/.bin/webpack | |
Step #1: | |
Step #1: README.md | |
Step #1: decls | |
Step #1: package.json | |
Step #1: react.js | |
Step #1: webpack.config.js |
curl -XPUT 'localhost:9200/answers/user/1?pretty' -H 'Content-Type: application/json' -d'
{
"user" : 1,
"choice" : [ "A", "B", "C" ]
}
'
curl -XPOST 'localhost:9200/_search?pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"term" : { "choice" : "B" }
}
}
'
curl -XPOST 'localhost:9200/_search?pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"bool" : {
"must_not" : {
"term" : { "choice" : "A" }
},
"must" : {
"term" : { "choice" : "B" }
curl -XPOST 'localhost:9200/_search?pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"bool" : {
"must" : {
"term" : { "choice" : "B" }
},
"must" : {
"script" : {
curl -XPOST 'localhost:9200/_search?pretty' -H 'Content-Type: application/json' -d'
{
"query": {
"bool" : {
"must" : {
"term" : { "choice" : "B" }
},
"must" : {
"term" : { "choice" : "C" }
This file contains 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
'use strict'; | |
exports.handler = (event, context, callback) => { | |
// Get request and request headers | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
// Configure authentication | |
const authUser = 'user'; | |
const authPass = 'pass'; |