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
plugin.route({ | |
method: 'GET', | |
path: '/articles', | |
handler: function (request, reply) { | |
Wreck.request('POST', 'http://api.com./article/search', articleListMapper(), function (err, res) { | |
Wreck.read(res, { | |
json: true | |
}, function (err, body) { | |
reply.view('index.ejs', body); | |
}); |
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
plugin.route({ | |
method: 'POST', | |
path: '/create/page/section', | |
config: { | |
validate: { | |
payload: schemas.sectionCreateSchema | |
}, | |
pre: [{ method: models.createSection, assign: 'created'}] | |
}, | |
handler: function(request, reply) { |
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
server.connection({ | |
port: internals.port, | |
routes: { | |
cors: { | |
origin: ['www.example.com'], | |
credentials: true | |
} | |
}, | |
}); |
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
[config] | |
command = bash deploy.sh |
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
version: '3' | |
volumes: | |
database_data: | |
driver: local | |
services: | |
################################ | |
# Setup postgres container | |
################################ |
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 node:latest | |
# Create app directory | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY package.json /usr/src/app/ | |
RUN npm install |
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 node:latest | |
# Create app directory | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY package.json /usr/src/app/ | |
RUN npm install |
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
version: '3' | |
services: | |
server: | |
volumes: | |
- ./server/src:/usr/src/app/src/ | |
command: npm run dev | |
frontend: | |
volumes: |
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
version: '3' | |
services: | |
#test_server: | |
# build: ./server | |
# links: | |
# - test_database | |
# environment: | |
# - PGHOST=test_database | |
# - PGDATABASE=postgres |
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
{ | |
"$schema": "http://json.schemastore.org/proxies", | |
"proxies": { | |
"api": { | |
"matchCondition": { | |
"route": "/api/{*path}" | |
}, | |
"backendUri": "https://<APP_URL>/api/{path}", | |
"responseOverrides": { | |
"response.headers.Content-Type": "application/json" |
OlderNewer