Skip to content
Permalink
Browse files

Prep for Heroku

  • Loading branch information
crock committed Dec 8, 2018
1 parent b985e56 commit b3c4f0382d36e6b08af06225373d883c3af2e32d
Showing with 366 additions and 99 deletions.
  1. +14 −0 .env.example
  2. +2 −3 .gitignore
  3. +1 −0 Procfile
  4. +2 −2 README.md
  5. +3 −1 app.js
  6. +0 −5 configs/instagram.example.json
  7. +0 −4 configs/twitch.example.json
  8. +0 −6 configs/twitter.example.json
  9. +0 −74 docs.html
  10. +1 −2 libs/Twitch.js
  11. +6 −1 libs/Twitter.js
  12. +3 −1 package.json
  13. +334 −0 yarn.lock
@@ -0,0 +1,14 @@
# Instagram
IG_CLIENT_ID=
IG_CLIENT_SECRET=
IG_ACCESS_TOKEN=

# Twitter
TWTR_CONSUMER_KEY=
TWTR_CONSUMER_SECRET=
TWTR_ACCESS_TOKEN_KEY=
TWTR_ACCESS_TOKEN_SECRET=

# TWitch
TWITCH_CLIENT_ID=
TWITCH_CLIENT_SECRET=
@@ -10,9 +10,8 @@ node_modules/
.atom/

# Private Configuration Variables
configs/twitter.json
configs/instagram.json
configs/twitch.json
configs/*
.env

# Private API Keys
apikeys.json
@@ -0,0 +1 @@
web=npm start
@@ -1,3 +1,3 @@
# OGCheckr API
# Penguin API

The official REST API for OGCheckr applications
The official REST API for Penguin apps
4 app.js
@@ -1,3 +1,5 @@
require('dotenv').config();

const express = require('express');
const cors = require('cors');
const app = express();
@@ -109,6 +111,6 @@ function haltOnTimedout (req, res, next) {
if (!req.timedout) next()
}

app.listen(8080, 'localhost');
app.listen(process.env.PORT || 5000);

module.exports = app;

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -4,9 +4,8 @@ const twitch = require('twitch-api-v5');

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

twitch.clientID = config.clientId;
twitch.clientID = process.env.TWITCH_CLIENT_ID;

twitch.users.usersByName({"users": [word]}, function(error, response) {
if(error) {
@@ -5,7 +5,12 @@ const Twitter = require('twitter-lite');

function CheckTwitter(service, word, res) {
res.type('json');
var config = require('../configs/twitter.json');
var config = {
"consumer_key": process.env.TWTR_CONSUMER_KEY,
"consumer_secret": process.env.TWTR_CONSUMER_SECRET,
"access_token_key": process.env.TWTR_ACCESS_TOKEN_KEY,
"access_token_secret": process.env.TWTR_ACCESS_TOKEN_SECRET
};
var client = new Twitter(config);

client.get('users/show', {screen_name: word, include_entities: false})
@@ -3,7 +3,8 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
"dev": "node ./bin/www",
"start": "node ./app.js"
},
"dependencies": {
"apicache": "^1.2.1",
@@ -14,6 +15,7 @@
"cookie-parser": "~1.4.3",
"cors": "^2.8.4",
"debug": "~2.6.9",
"dotenv": "^6.2.0",
"express": "~4.15.5",
"faker": "^4.1.0",
"morgan": "~1.9.0",

0 comments on commit b3c4f03

Please sign in to comment.
You can’t perform that action at this time.