Merge branch 'master' of github.com:KevinMidboe/seasonedShows
This commit is contained in:
17
.gitignore
vendored
17
.gitignore
vendored
@@ -1,14 +1,7 @@
|
|||||||
__pycache__
|
|
||||||
shows.db
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
env_variables.py
|
|
||||||
app/conf/classedOutput.log
|
env
|
||||||
node_modules
|
|
||||||
*.pyc
|
yarn.lock
|
||||||
npm-debug.log
|
|
||||||
webpage/js/env_variables.js
|
|
||||||
client/dist
|
|
||||||
src/webserver/access.log
|
|
||||||
seasoned_api/conf/development.json
|
|
||||||
yarn-error.log
|
|
||||||
*/yarn.lock
|
*/yarn.lock
|
||||||
|
*/package-lock.json
|
||||||
|
|||||||
108
app/.gitignore
vendored
Normal file
108
app/.gitignore
vendored
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
.hypothesis/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
.static_storage/
|
||||||
|
.media/
|
||||||
|
local_settings.py
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
|
||||||
|
# - - - - -
|
||||||
|
# My own gitignore files and folders
|
||||||
|
env_variables.py
|
||||||
58
client/.gitignore
vendored
Normal file
58
client/.gitignore
vendored
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Typescript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
@@ -7,7 +7,8 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server --open --config webpack.dev.js",
|
"start": "webpack-dev-server --open --config webpack.dev.js",
|
||||||
"build": "webpack --config webpack.prod.js"
|
"build": "webpack --config webpack.prod.js",
|
||||||
|
"build_dev": "webpack --config webpack.dev.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clean-webpack-plugin": "^0.1.17",
|
"clean-webpack-plugin": "^0.1.17",
|
||||||
|
|||||||
64
seasoned_api/.gitignore
vendored
Normal file
64
seasoned_api/.gitignore
vendored
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# Typescript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
|
||||||
|
|
||||||
|
# - - - - -
|
||||||
|
# My own gitignore files and folders
|
||||||
|
shows.db
|
||||||
|
conf
|
||||||
24
seasoned_api/conf/development.json
Normal file
24
seasoned_api/conf/development.json
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"host": "../shows.db"
|
||||||
|
},
|
||||||
|
"webserver": {
|
||||||
|
"port": 31459
|
||||||
|
},
|
||||||
|
"tmdb": {
|
||||||
|
"apiKey": ""
|
||||||
|
},
|
||||||
|
"raven": {
|
||||||
|
"DSN": ""
|
||||||
|
},
|
||||||
|
"mail": {
|
||||||
|
"host": "",
|
||||||
|
"user": "",
|
||||||
|
"password": "",
|
||||||
|
"user_pi": "",
|
||||||
|
"password_pi": ""
|
||||||
|
},
|
||||||
|
"authentication": {
|
||||||
|
"secret": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
1
seasoned_api/conf/output.log
Normal file
1
seasoned_api/conf/output.log
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -3,8 +3,10 @@ const Raven = require('raven');
|
|||||||
const bodyParser = require('body-parser');
|
const bodyParser = require('body-parser');
|
||||||
const tokenToUser = require('./middleware/tokenToUser');
|
const tokenToUser = require('./middleware/tokenToUser');
|
||||||
const mustBeAuthenticated = require('./middleware/mustBeAuthenticated');
|
const mustBeAuthenticated = require('./middleware/mustBeAuthenticated');
|
||||||
|
const configuration = require('src/config/configuration').getInstance();
|
||||||
|
|
||||||
Raven.config('__DSN__').install();
|
// TODO: Have our raven router check if there is a value, if not don't enable raven.
|
||||||
|
Raven.config(configuration.get('raven', 'DSN')).install();
|
||||||
const app = express(); // define our app using express
|
const app = express(); // define our app using express
|
||||||
app.use(Raven.requestHandler());
|
app.use(Raven.requestHandler());
|
||||||
// this will let us get the data from a POST
|
// this will let us get the data from a POST
|
||||||
@@ -20,13 +22,16 @@ const port = 31459; // set our port
|
|||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
const allowedOrigins = ['https://kevinmidboe.com', 'http://localhost:8080'];
|
const allowedOrigins = ['https://kevinmidboe.com', 'http://localhost:8080'];
|
||||||
|
|
||||||
|
// TODO: All JSON handling in a single router
|
||||||
// router.use(bodyParser.json());
|
// router.use(bodyParser.json());
|
||||||
app.use(bodyParser.urlencoded({ extended: true }));
|
app.use(bodyParser.urlencoded({ extended: true }));
|
||||||
|
|
||||||
|
|
||||||
|
// This is probably a correct middleware/router setup
|
||||||
/* Decode the Authorization header if provided */
|
/* Decode the Authorization header if provided */
|
||||||
router.use(tokenToUser);
|
router.use(tokenToUser);
|
||||||
|
|
||||||
|
// TODO: Should have a separate middleware/router for handling headers.
|
||||||
router.use((req, res, next) => {
|
router.use((req, res, next) => {
|
||||||
// TODO add logging of all incoming
|
// TODO add logging of all incoming
|
||||||
console.log('Request: ', req.originalUrl);
|
console.log('Request: ', req.originalUrl);
|
||||||
|
|||||||
Reference in New Issue
Block a user