Skip to content

Commit

Permalink
fix: put client_id in separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
narajaon committed Mar 25, 2020
1 parent 52c207c commit 43d40a6
Show file tree
Hide file tree
Showing 4 changed files with 2,477 additions and 2,453 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ dist
.tern-port

# app config
config.json
secret.json
4 changes: 4 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"api_url": "https://api.twitch.tv/helix/",
"api_url_old": "https://api.twitch.tv/kraken/"
}
3 changes: 2 additions & 1 deletion instances/Server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-param-reassign */
const express = require('express');
const secret = require('../secret.json');
const config = require('../config.json');

const PORT = process.env.NODE_ENV || 3000;
Expand All @@ -13,7 +14,7 @@ class Server {
this.instance.use(/\//, (req, res, next) => {
req.api_url = config.api_url;
req.api_url_old = config.api_url_old;
req.client_id = config.client_id;
req.client_id = secret.client_id;

next();
});
Expand Down
Loading

0 comments on commit 43d40a6

Please sign in to comment.