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 express = require('express'); | |
const session = require('express-session'); | |
const redis = require('redis'); | |
const connectRedis = require('connect-redis'); | |
const app = express(); | |
// if you run behind a proxy (e.g. nginx) | |
// app.set('trust proxy', 1); |
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 './AddComment.scss'; | |
import {Form, Image, TextArea} from "semantic-ui-react"; | |
export function AddComment() { | |
return ( | |
<div className='add-comment'> | |
<Image className='user-image' src='http://via.placeholder.com/48x48' circular/> | |
<Form> | |
<Form.TextArea control={TextArea} autoHeight placeholder='Add a public comment' /> |
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, {Component} from 'react'; | |
import {Home} from './containers/Home/Home'; | |
import {AppLayout} from './components/AppLayout/AppLayout'; | |
import {Route, Switch} from 'react-router-dom'; | |
import {Watch} from './containers/Watch/Watch'; | |
class App extends Component { | |
render() { | |
return ( | |
<AppLayout> |
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
yarn add node-sass |
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, { Component } from 'react'; | |
class App extends Component { | |
render() { | |
return ( | |
<div>Hello World</div> | |
); | |
} | |
} |
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
npx create-react-app youtube-react |
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
cd youtube-react | |
git init | |
# connect your local repo to the repo on Github | |
git remote add origin git@github.com:<YOUR_REPO_NAME>.git | |
# add all files that create-react-app has created to the repository | |
git add -A | |
git commit -m "initial commit" | |
git push -u origin master |
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 {Video} from '../../../components/Video/Video'; | |
import {VideoMetadata} from '../../../components/VideoMetadata/VideoMetadata'; | |
import {VideoInfoBox} from '../../../components/VideoInfoBox/VideoInfoBox'; | |
import {Comments} from '../../Comments/Comments'; | |
import {RelatedVideos} from '../../../components/RelatedVideos/RelatedVideos'; | |
import './WatchContent.scss'; | |
import {getAmountComments, getRelatedVideos, getVideoById} from '../../../store/reducers/videos'; | |
import {connect} from 'react-redux'; |
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 * as api from '../api/youtube-api'; | |
import {fork, take, takeEvery, call, all, put} from 'redux-saga/effects'; | |
import {fetchEntity} from './index'; | |
export const fetchVideoCategories = fetchEntity.bind(null, api.buildVideoCategoriesRequest, videoActions.categories); | |
export function* watchVideoCategories() { | |
yield takeEvery(videoActions.VIDEO_CATEGORIES[REQUEST], fetchVideoCategories); | |
} |
NewerOlder