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
# | |
# axios | |
# | |
import axios from 'axios' | |
const api = axios.create({ | |
baseURL: 'http://localhost:3000' | |
}) |
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 {Builder, By, Key, until} = require('selenium-webdriver'); | |
async function login(browser) { | |
await browser.get('http://www.google.com') | |
const element = await browser.findElement(By.name('q')) | |
await element.sendKeys('webdriver', Key.RETURN) | |
await browser.wait(until.titleIs('webdriver - Google Search'), 1000) | |
} |
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
module.exports = { | |
page: null, | |
start: async function() { | |
const puppeteer = require('puppeteer'); | |
const browser = await puppeteer.launch( {headless: false} ); | |
const this.page = await browser.newPage(); | |
await this.page.goto('https://www.google.com'); | |
}, |
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
# API | |
import axios from 'axios' | |
const api = axios.create({ | |
//baseURL: 'https://rocketseat-node.herokuapp.com/api' | |
baseURL: 'http://localhost:3000' | |
}) | |
export default 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
{ | |
data: Array(1) | |
} | |
data | |
: | |
Array(1) | |
0 | |
: |
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
var express = require('express'), | |
app = express(), | |
port = process.env.PORT || 3000 | |
var mongoose = require('mongoose') | |
var Task = require('./api/models/todoListModel') | |
var IgAccount = require('./api/models/IgAccountModel') | |
var bodyParser = require('body-parser') | |
// mongoose instance connection url connection | |
mongoose.Promise = global.Promise; |
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
# | |
# MONGOOSE | |
# | |
{data: Array(1), status: 200, statusText: "OK", headers: {…}, config: {…}, …} | |
config | |
: | |
{adapter: ƒ, transformRequest: {…}, transformResponse: {…}, timeout: 0, xsrfCookieName: "XSRF-TOKEN", …} | |
data | |
: | |
Array(1) |
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
import axios from 'axios' | |
const api = axios.create({ | |
baseURL: 'https://rocketseat-node.herokuapp.com/api' | |
}) | |
export default 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
# ERROR: | |
WARNING in ./node_modules/express/lib/view.js 81:13-25 | |
Critical dependency: the request of a dependency is an expression | |
@ ./node_modules/express/lib/application.js | |
@ ./node_modules/express/lib/express.js | |
@ ./node_modules/express/index.js | |
@ ./app/services/api_mongo.js | |
@ ./app/src/components/Dashboard/index.jsx | |
@ ./app/src/renderer_process.js |
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
import React, {Component, Fragment} from 'react' | |
import styles from './styles.css' | |
import {HashRouter as Router, Link} from 'react-router-dom' | |
import api from '../../services/api' | |
export default class Dashboard extends Component { | |
constructor(props) { | |
super(props); |