Make port configurable in .env
This commit is contained in:
parent
95bade9c88
commit
64bdd47aed
|
@ -1,4 +1,5 @@
|
||||||
OBS_PASSWORD=4444
|
OBS_PASSWORD=4444
|
||||||
|
PORT=5555
|
||||||
tokenAddress=1287981y925hjskklsjatkls
|
tokenAddress=1287981y925hjskklsjatkls
|
||||||
DISCORD_TOKEN=21987578912592781598
|
DISCORD_TOKEN=21987578912592781598
|
||||||
STATS_CHANNEL_ID=982157698127589
|
STATS_CHANNEL_ID=982157698127589
|
||||||
|
|
2
main.js
2
main.js
|
@ -9,7 +9,7 @@ const Discord = require('discord.js');
|
||||||
const readline = require('readline');
|
const readline = require('readline');
|
||||||
const envPath = path.resolve(__dirname, '.env');
|
const envPath = path.resolve(__dirname, '.env');
|
||||||
|
|
||||||
const obsWebSocketUrl = 'ws://localhost:4444';
|
const obsWebSocketUrl = `ws://localhost:${process.env.PORT}`;
|
||||||
const password = process.env.OBS_PASSWORD;
|
const password = process.env.OBS_PASSWORD;
|
||||||
|
|
||||||
const discordToken = process.env.DISCORD_TOKEN;
|
const discordToken = process.env.DISCORD_TOKEN;
|
||||||
|
|
Loading…
Reference in New Issue