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
//function to add | |
const add = (num1, num2) => num1 + num2; | |
//function to multiply | |
const multiply = (num1, num2) => num1 * num2; | |
//function to create an Object | |
const createUser = () => { | |
const user = { | |
firstName: "Luke", | |
lastName: "Skywalker", | |
}; |
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 express from "express"; | |
import { graphqlHTTP } from "express-graphql"; | |
import { buildSchema } from "graphql"; | |
//Images data | |
const imagesData = [ | |
{ | |
id: 1, | |
title: "Stacked Brwonies", |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Docker Demo</title> | |
</head> | |
<body> | |
<h1>To Do List</h1> |
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:17.6-alpine | |
WORKDIR /home/demo_app/ | |
COPY package.json package.json | |
RUN npm install | |
COPY ./demo_app . |
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 dotenv from "dotenv"; | |
import { fileURLToPath } from "url"; | |
import { dirname } from "path"; | |
import express from "express"; | |
import crypto from "crypto"; | |
import twilio from "twilio"; | |
dotenv.config(); | |
const __filename = fileURLToPath(import.meta.url); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Twilio Livestream Demo | Codesphere</title> | |
</head> | |
<body> | |
<h1>Twilio Livestream Demo</h1> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<script | |
defer | |
src="https://sdk.twilio.com/js/video/releases/2.18.0/twilio-video.min.js" | |
></script> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<script defer src="../livePlayer/twilio-live-player.min.js"></script> | |
<script defer src="audience.js" type="text/javascript"></script> | |
<title>Twilio Livestream | Audience</title> | |
</head> |
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 from "react"; | |
import { | |
KeyboardAvoidingView, | |
StyleSheet, | |
Text, | |
View, | |
TextInput, | |
TouchableOpacity, | |
Keyboard, | |
ScrollView, |
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 from "react"; | |
import { View, Text, StyleSheet } from "react-native"; | |
function Task(props) { | |
return ( | |
<View style={styles.item}> | |
<View style={styles.itemLeft}> | |
<Text style={styles.itemText}>{props.text}</Text> | |
</View> | |
</View> |