clean up development config
This commit is contained in:
17
server/config/controllers.js
Normal file
17
server/config/controllers.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import fs from 'fs';
|
||||
|
||||
const CONTROLLER_DIR = __dirname + '/../controllers';
|
||||
|
||||
class Controllers {
|
||||
|
||||
static sync(){
|
||||
fs.readdirSync(CONTROLLER_DIR).forEach(function(file) {
|
||||
var controller = require(CONTROLLER_DIR + '/' + file);
|
||||
Controllers[controller.NAME] = controller;
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default Controllers;
|
||||
@@ -10,15 +10,15 @@ var sequelize = new Sequelize("postgres://spikeuser:123456@localhost:5432/spike2
|
||||
idle: 10000
|
||||
}
|
||||
});
|
||||
const model_dir = __dirname + '/../models'
|
||||
const MODEL_DIR = __dirname + '/../models'
|
||||
|
||||
class Database {
|
||||
|
||||
static sync(){
|
||||
console.log("syncing db")
|
||||
fs.readdirSync(model_dir).forEach(function(file) {
|
||||
var model = require(model_dir + '/' + file);
|
||||
Database[model.name] = model;
|
||||
fs.readdirSync(MODEL_DIR).forEach(function(file) {
|
||||
var model = require(MODEL_DIR + '/' + file);
|
||||
Database[model.NAME] = model;
|
||||
Database.models.push(model);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
export default {
|
||||
var config = {
|
||||
modules: 'es6',
|
||||
'target-version': '0.14.3',
|
||||
'suffix': '.rt'
|
||||
targetVersion: '0.14.0',
|
||||
suffix: '.rt'
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import webpack from 'webpack';
|
||||
|
||||
const ROOT = __dirname + '/../../../';
|
||||
|
||||
module.exports = {
|
||||
@@ -17,21 +19,20 @@ module.exports = {
|
||||
loaders: [
|
||||
{
|
||||
test: /\.scss$/,
|
||||
loader: ['style', 'raw', 'sass']
|
||||
loaders: ['style', 'raw', 'sass']
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
loader: ['style', 'raw']
|
||||
loaders: ['style', 'raw']
|
||||
}, {
|
||||
test: /\.js$/,
|
||||
loader: 'babel'
|
||||
}
|
||||
]
|
||||
},
|
||||
sassLoader: {
|
||||
includePaths: [ROOT + 'client', ROOT + 'node_modules']
|
||||
},
|
||||
// Use the plugin to specify the resulting filename (and add needed behavior to the compiler)
|
||||
plugins: [
|
||||
new ExtractTextPlugin("style.css", {
|
||||
allChunks: true
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
$: "jquery",
|
||||
jQuery: "jquery",
|
||||
|
||||
Reference in New Issue
Block a user