File tree Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Expand file tree Collapse file tree 5 files changed +9
-4
lines changed Original file line number Diff line number Diff line change
1
+ YT3_API_KEY = YOUR_YOUTUBE_DATA_API_V3_KEY
2
+ DM_API_KEY = YOUR_DAILYMOTION_API_KEY
Original file line number Diff line number Diff line change 1
1
node_modules /
2
2
index_old.html
3
3
app-env
4
+ .env
Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ Install Dependencies
39
39
npm install
40
40
```
41
41
42
- Obtain API keys for YouTube Data API V3 and Dailymotion SDK (Optional) and
43
- source it to your path as YT3_API_KEY and DM_API_KEY respectively
42
+ Create a ` .env ` file and add API keys for YouTube Data API V3 and Dailymotion SDK (Optional) as YT3_API_KEY and DM_API_KEY
44
43
45
44
Run the server
46
45
```
Original file line number Diff line number Diff line change 13
13
"author" : " Kyle Lim" ,
14
14
"license" : " ISC" ,
15
15
"dependencies" : {
16
+ "dotenv" : " 8.1.0" ,
16
17
"express" : " *" ,
17
18
"lodash" : " ^4.17.11" ,
18
19
"socket.io" : " *"
Original file line number Diff line number Diff line change
1
+ require ( 'dotenv' ) . config ( ) ;
2
+
1
3
var express = require ( 'express' ) ;
2
4
var app = express ( ) ;
3
5
var server = require ( 'http' ) . createServer ( app ) ;
@@ -8,8 +10,8 @@ rooms = [];
8
10
// Store all of the sockets and their respective room numbers
9
11
userrooms = { }
10
12
11
- YT3_API_KEY = process . env . YT3_API_KEY
12
- DM_API_KEY = process . env . DM_API_KEY
13
+ YT3_API_KEY = process . env . YT3_API_KEY ;
14
+ DM_API_KEY = process . env . DM_API_KEY ;
13
15
14
16
// Set given room for url parameter
15
17
var given_room = ""
You can’t perform that action at this time.
0 commit comments