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
| 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 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
| 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 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
| version: '3' | |
| volumes: | |
| database_data: | |
| driver: local | |
| services: | |
| ################################ | |
| # Setup postgres container | |
| ################################ |
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
| [config] | |
| command = bash deploy.sh |
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
| server.connection({ | |
| port: internals.port, | |
| routes: { | |
| cors: { | |
| origin: ['www.example.com'], | |
| credentials: true | |
| } | |
| }, | |
| }); |
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
| 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 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
| 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); | |
| }); |
NewerOlder