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
| let beer = [ | |
| ['name', 'Hopadillo'], | |
| ['ABV', '6.6%'], | |
| ['price', '$2.00'] | |
| ] | |
| let beerFromEntries = Object.fromEntries(beer) | |
| // console.log(beerFromEntries) | |
| // { |
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
| let beer = { name: 'Hopadillo', ABV: '6.6%', price: '$2.00' } | |
| let beerBreweryLocation = { state: 'Texas' } | |
| let beerObj = Object.assign(beer, beerBreweryLocation) | |
| // console.log(beerObj) | |
| // { | |
| // name:"Hopadillo", | |
| // ABV:"6.6%", | |
| // price:"$2.00", |
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
| let beerEntries = Object.entries(beer) | |
| // console.log(beerEntries) | |
| // [ | |
| // ['name', 'Hopadillo'], | |
| // ['ABV', '6.6%'], | |
| // ['price': '$2.00'] | |
| // ] |
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
| let beerValues = Object.values(beer) | |
| // console.log(beerValues) | |
| // ["Hopadillo", "6.6%", "$2.00"] |
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
| let beerKeys = Object.keys(beer) | |
| // console.log(beerKeys) | |
| // ["name", "ABV", "price"] |
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
| let beer = { name: 'Hopadillo', ABV: '6.6%', price: '$2.00' } | |
| // OR | |
| let beer = new Object({ name: 'Hopadillo', ABV: '6.6%', price: '$2.00' }) | |
| // OR | |
| function alcohol(name, ABV, price){ | |
| this.name = name; |
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, { useState, useEffect, useRef } from 'react' | |
| import Navbar from '../../components/Navbar/Navbar' | |
| import BroadcastButton from '../../components/Buttons/BroadcastButton' | |
| import Timer from '../../components/Timer/Timer' | |
| import formatTime from '../../utils/formatTime' | |
| import getCookie from '../../utils/getCookie' | |
| import API from '../../api/api' | |
| import './Broadcast.css' | |
| const CAPTURE_OPTIONS = { |
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 child_process = require('child_process') // To be used later for running FFmpeg | |
| const express = require('express') | |
| const WebSocket = require('ws') | |
| const app = express() | |
| const cors = require('cors') | |
| const path = require('path') | |
| require('dotenv').config() | |
| app.use(cors()) |
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, { useState, useEffect, useRef } from 'react' | |
| import Navbar from '../../components/Navbar/Navbar' | |
| import BroadcastButton from '../../components/Buttons/BroadcastButton' | |
| import Timer from '../../components/Timer/Timer' | |
| import formatTime from '../../utils/formatTime' | |
| import getCookie from '../../utils/getCookie' | |
| import API from '../../api/api' | |
| import './Broadcast.css' | |
| const CAPTURE_OPTIONS = { |
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 { | |
| root /var/www/html; | |
| # Add index.php to the list if you are using PHP | |
| index index.html index.htm index.nginx-debian.html; | |
| server_name ohmystream.xyz www.ohmystream.xyz; | |
| location /websocket { |