Skip to content

Commit b3c4f03

Browse files
committed
Prep for Heroku
1 parent b985e56 commit b3c4f03

File tree

13 files changed

+366
-99
lines changed

13 files changed

+366
-99
lines changed

.env.example

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Instagram
2+
IG_CLIENT_ID=
3+
IG_CLIENT_SECRET=
4+
IG_ACCESS_TOKEN=
5+
6+
# Twitter
7+
TWTR_CONSUMER_KEY=
8+
TWTR_CONSUMER_SECRET=
9+
TWTR_ACCESS_TOKEN_KEY=
10+
TWTR_ACCESS_TOKEN_SECRET=
11+
12+
# TWitch
13+
TWITCH_CLIENT_ID=
14+
TWITCH_CLIENT_SECRET=

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ node_modules/
1010
.atom/
1111

1212
# Private Configuration Variables
13-
configs/twitter.json
14-
configs/instagram.json
15-
configs/twitch.json
13+
configs/*
14+
.env
1615

1716
# Private API Keys
1817
apikeys.json

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web=npm start

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# OGCheckr API
1+
# Penguin API
22

3-
The official REST API for OGCheckr applications
3+
The official REST API for Penguin apps

app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require('dotenv').config();
2+
13
const express = require('express');
24
const cors = require('cors');
35
const app = express();
@@ -109,6 +111,6 @@ function haltOnTimedout (req, res, next) {
109111
if (!req.timedout) next()
110112
}
111113

112-
app.listen(8080, 'localhost');
114+
app.listen(process.env.PORT || 5000);
113115

114116
module.exports = app;

configs/instagram.example.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

configs/twitch.example.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

configs/twitter.example.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs.html

Lines changed: 0 additions & 74 deletions
This file was deleted.

libs/Twitch.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ const twitch = require('twitch-api-v5');
44

55
function CheckTwitch(service, word, res) {
66
res.type('json');
7-
var config = require('../configs/twitch.json');
87

9-
twitch.clientID = config.clientId;
8+
twitch.clientID = process.env.TWITCH_CLIENT_ID;
109

1110
twitch.users.usersByName({"users": [word]}, function(error, response) {
1211
if(error) {

0 commit comments

Comments
 (0)