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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
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
class Slider extends React.Component { | |
constructor(props) { | |
super(props); | |
this.x = 0; | |
this.state = { | |
arrowLeft: false, | |
arrowRight: true | |
}; | |
this.slider = React.createRef(); | |
} |
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
upstream services { | |
server 172.31.19.41:3002; | |
server 172.31.31.127:3002; | |
server 172.31.16.133:3002; | |
server 172.31.28.242:3002; | |
server 172.31.25.222:3002; | |
server 172.31.21.58:3002; | |
server 172.31.17.65:3002; | |
server 172.31.16.80:3002; | |
} |
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": { | |
"target": "http://localhost:3000", | |
"phases": [ | |
{ | |
"duration": 60, | |
"arrivalRate": 250 | |
} | |
] | |
}, |
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": { | |
"target": "http://localhost:3002", | |
"phases": [ | |
{ | |
"duration": 60, | |
"arrivalRate": 250 | |
} | |
] | |
}, |
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
const app = require('../server/index.js'); | |
const request = require('supertest'); | |
jest.setTimeout(5000); | |
test('should respond with an array of objects', async (done) => { | |
const res = await request(app).get('/api/similar'); | |
const response = JSON.parse(res.text); | |
const allObjects = response.every((item)=> typeof item === 'object'); |
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
[ | |
{ | |
"_id": "5faf1f26575f2e102456d1fe", | |
"streetAddress": "951 Natalia Pike", | |
"streetName": "Abernathy Lock", | |
"state": "The North", | |
"zipcode": "75617", | |
"neighborhood": "Last Hearth", | |
"city": "Winterfell", | |
"bedrooms": 2, |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
class App extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
value: 'example' | |
}; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>React App</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script type="text/javascript" src="bundle.js"></script> | |
</body> |