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
# Review checklist | |
## General | |
1. Does the code work? | |
2. Description of the project status is included. | |
3. Code is easily understand. | |
4. Code is written following the coding standarts/guidelines (React in our case). | |
5. Code is in sync with existing code patterns/technologies. | |
6. DRY. Is the same code duplicated more than twice? |
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 { Kafka } = require('kafkajs') | |
// This creates a client instance that is configured to connect to the Kafka broker provided by | |
// the environment variable KAFKA_BOOTSTRAP_SERVER | |
const kafka = new Kafka({ | |
clientId: 'qa-topic', | |
brokers: ['xxxxxxxxx.confluent.cloud:9092'], | |
ssl: true, | |
logLevel: 2, | |
sasl: { |
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 { startBrowser } = require("./browser"); | |
const cheerio = require("cheerio"); | |
async function scrapeData(url) { | |
const browser = await startBrowser(); | |
const page = await browser.newPage(); | |
await page.goto(url, { waitUntil: "networkidle0" }); | |
await page.waitForSelector(".listResults"); | |
const content = await page.content(); | |
const links = await getJobData(content); |
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 { startBrowser } = require('./browser'); | |
const cheerio = require('cheerio'); | |
async function scrapeData() { | |
const books = []; | |
const browser = await startBrowser(); | |
const page = await browser.newPage(); | |
await page.goto('http://books.toscrape.com/', { waitUntil: 'networkidle0' }) | |
await page.waitForSelector('.page_inner'); |
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.5' | |
services: | |
zota_mongo: | |
volumes: | |
- mongo_data:/data/configdb | |
- mongo_data:/data/mysql | |
gateway: | |
volumes: | |
- ./proxy/default.conf:/etc/nginx/conf.d/default.conf:ro | |
- ./proxy/ssl:/etc/nginx/ssl:ro |
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:carbon | |
WORKDIR /usr/src/app | |
ARG GIT_TOKEN | |
COPY package.json package-lock.json .npmrc ./ | |
RUN npm install | |
RUN rm -f .npmrc | |
# Add your source files | |
COPY . . | |
EXPOSE 3000 | |
RUN npm run build |
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.5' | |
services: | |
gateway: | |
image: nginx:1.11 | |
ports: | |
- 88:80 | |
- 443:443 | |
depends_on: | |
- zota_car | |
- zota_company |
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.5' | |
services: | |
zota_mongo: | |
volumes: | |
- mongo_data:/data/configdb | |
- mongo_data:/data/mysql | |
gateway: | |
volumes: | |
- ./proxy/default.conf:/etc/nginx/conf.d/default.conf:ro | |
- ./proxy/ssl:/etc/nginx/ssl:ro |
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
``` | |
setState() | |
- is Asynchronous | |
- can have a function as a parameter instead of object | |
- can accepts a Callback function as a second argument (optional) | |
- does not return promise | |
``` | |
function updateState(){ | |
this.setState({load: true}, () => { |
NewerOlder