add nodemon, remove .env from being tracked

This commit is contained in:
catarak 2016-06-22 18:48:45 -04:00
parent 3c39574041
commit 3aa3a4d03f
5 changed files with 21 additions and 8 deletions

4
.env
View file

@ -1,4 +0,0 @@
MONGO_URL=mongodb://localhost:27017/p5js-web-editor
PORT=8000
SESSION_SECRET=dyR;Ihp9Y/<i=m9&FUBwV\)$";;G:5a-_G4>W@?r~k$JR$nw74=#_Cus[z{yBj`Mq:I8LpWE~g{;B,}t\p/`Wjevkb!$n}N];u`Om57NF^GK@z5qF{0L04)Mz6{Djk
NODE_ENV=development

4
.gitignore vendored
View file

@ -1,8 +1,8 @@
.DS_Store .DS_Store
.env
node_modules/ node_modules/
npm-debug.log npm-debug.log
dump.rdb dump.rdb
public/* public/*
static/dist static/dist
static/css/app.min.css static/css/app.min.css
.env

16
nodemon.json Normal file
View file

@ -0,0 +1,16 @@
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules"
],
"verbose": true,
"watch": [
"server"
],
"env": {
"NODE_ENV": "development"
},
"ext": "js json"
}

View file

@ -4,7 +4,7 @@
"description": "The web editor for p5.js.", "description": "The web editor for p5.js.",
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {
"start": "node index.js", "start": "BABEL_DISABLE_CACHE=1 NODE_ENV=development nodemon index.js",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": "Cassie Tarakajian", "author": "Cassie Tarakajian",
@ -23,6 +23,7 @@
"css-loader": "^0.23.1", "css-loader": "^0.23.1",
"file-loader": "^0.8.5", "file-loader": "^0.8.5",
"node-sass": "^3.7.0", "node-sass": "^3.7.0",
"nodemon": "^1.9.2",
"redux-devtools": "^3.3.1", "redux-devtools": "^3.3.1",
"redux-devtools-dock-monitor": "^1.1.1", "redux-devtools-dock-monitor": "^1.1.1",
"redux-devtools-log-monitor": "^1.0.11", "redux-devtools-log-monitor": "^1.0.11",

View file

@ -5,7 +5,7 @@ export function createProject(req, res) {
user: req.user ? req.user._id : undefined, user: req.user ? req.user._id : undefined,
file: {} file: {}
} }
Object.assign(projectValues, req.body); Object.assign(projectValues, req.body);
Project.create(projectValues, function(err, newProject) { Project.create(projectValues, function(err, newProject) {