Commit 789f242b authored by Mark Stenglein's avatar Mark Stenglein

More config things

- transition to the node-config package
- use yaml for config, because yaml is fantastic
  - also, yaml has comments
:ocelotsloth:
parent c025cdcd
# General Application Settings
general :
name : "Schedules"
description : >
"A simple application to add your class schedules
to calendar applications, like your phone."
organization :
name : "Mason SRCT"
description : >
"Student Run Computing and Technology"
website : "srct.gmu.edu"
websiteURL : "https://srct.gmu.edu"
# Sequelize Settings (Database)
sequelize :
dialect : "sqlite"
storage : "./db.development/.sqlite"
# Data Sources etc
schools :
- slug : GMU
longName : George Mason University
semesters :
- slug : "GMU2016SP"
longName : "Spring 2016"
dataFile : "GMU2016SP.min.json"
- slug : "GMU2016S"
longName : "Summer 2016"
dataFile : "GMU2016S.min.json"
- slug : "GMU2016F"
longName : "Fall 2016"
dataFile : "GMU2016F.min.json"
- slug : "GMU2017SP"
longName : "Spring 2017"
dataFile : "GMU2017SP.min.json"
"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;
# General Application Settings
# Sequelize Settings (Database)
sequelize :
dialect : "mysql"
host : "localhost"
database : "schedules"
username : "schedules"
password : "srct"
pool :
max : 5
min : 0
idle : 10000
# Data Sources etc
{
"schools" : [
"GMU",
"VT"
],
"GMU" : {
"longName" : "George Mason University",
"semesters" : [
{
"slug" : "GMU2016SP",
"longName" : "Spring 2016"
},
{
"slug" : "GMU2016S",
"longName" : "Summer 2016"
},
{
"slug" : "GMU2016F",
"longName" : "Fall 2016"
},
{
"slug" : "GMU2017SP",
"longName" : "Spring 2017"
}
]
},
"VT" : {
"longName" : "Virginia Tech",
"semesters" : []
},
"dataFiles" : [
"GMU2016SP.min.json",
"GMU2016S.min.json",
"GMU2016F.min.json",
"GMU2017SP.min.json"
]
}
{
"development" : {
"dialect" : "sqlite",
"storage" : "./db.development.sqlite"
},
"test" : {
"dialect" : "sqlite",
"storage" : ":memory:"
},
"production" : {
"username" : "schedules",
"password" : "srct",
"database" : "schedules",
"host" : "localhost",
"dialect" : "mysql",
"pool" : {
"max" : 5,
"min" : 0,
"idle" : 10000
}
}
}
{
"name" : "Schedules",
"description" : "A simple application to add your class schedules to calendar applications.",
"organization" : {
"name" : "Mason SRCT",
"description": "Student Run Computing and Technology",
"website" : "srct.gmu.edu",
"websiteURL" : "https://srct.gmu.edu"
}
}
# General Application Settings
# Sequelize Settings (Database)
sequelize :
dialect : "sqlite"
storage : ":memory:"
# Data Sources etc
......@@ -7,10 +7,12 @@
},
"dependencies": {
"body-parser": "~1.15.1",
"config": "^1.24.0",
"cookie-parser": "~1.4.3",
"debug": "~2.2.0",
"express": "~4.13.4",
"ical-generator": "^0.2.8",
"js-yaml": "^3.6.1",
"morgan": "~1.7.0",
"mysql": "^2.11.1",
"node-sass": "^3.8.0",
......
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