Change data managment
This commit is contained in:
parent
95dcc7f347
commit
bc01f94f6e
|
@ -1,11 +1,16 @@
|
||||||
require('babel-register');
|
require('babel-register');
|
||||||
|
|
||||||
var app = new (require('express'))()
|
var app = new (require('express'))();
|
||||||
var port = process.env.PORT || 3000;
|
var port = process.env.PORT || 3000;
|
||||||
|
|
||||||
require('css-modules-require-hook')({
|
require('css-modules-require-hook')({
|
||||||
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
generateScopedName: '[name]__[local]___[hash:base64:5]'
|
||||||
})
|
});
|
||||||
|
|
||||||
|
var fs = require('fs');
|
||||||
|
var filename = './src/utils/data.json';
|
||||||
|
var dataStub = {"posts": []};
|
||||||
|
fs.writeFileSync(filename, JSON.stringify(dataStub));
|
||||||
|
|
||||||
|
|
||||||
// initalize webpack dev middleware if in development context
|
// initalize webpack dev middleware if in development context
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
{"posts":[]}
|
|
|
@ -2,7 +2,7 @@ const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const async = require('async');
|
const async = require('async');
|
||||||
const Compiler = require('./compiler');
|
const Compiler = require('./compiler');
|
||||||
const config = require('../utils/config.json');
|
const config = require('./config.json');
|
||||||
const data = require('./data.json');
|
const data = require('./data.json');
|
||||||
|
|
||||||
module.exports = function() {
|
module.exports = function() {
|
||||||
|
|
Loading…
Reference in New Issue