Commit c025cdcd authored by Mark Stenglein's avatar Mark Stenglein
Browse files

Add finish modular settings

- uses one single index.js file to aggregate all the other json
  files. This makes it easy to get at specific configs while
  allowing for only making one call to get the settings for the
  entire app.
parent 710e8803
......@@ -17,7 +17,7 @@ var Sequelize = require('sequelize');
// Load site wide configurations as well as the environment
// TODO: make the actual file an actual json file
var env = process.env.NODE_ENV || "development";
var config = require(path.join(__dirname, '..', 'config', 'config.json'))[env];
var config = require('./config/index');
// Load in Routes
// TODO: Make this a dynamic loading system that simply scans the directory
"use strict";
var fs = require("fs");
var path = require("path");
var Sequelize = require("sequelize");
var env = process.env.NODE_ENV || "development";
var config = {};
config.env = env;
config.sequelize = require(path.join(__dirname, 'sequelize.json'))[env];
config.schoolSemesters = require(path.join(__dirname, 'schoolSemesters.json'));
config.siteInfo = require(path.join(__dirname, 'siteInfo.json'));
module.exports = config;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment