Skip to content

Commit

Permalink
Editor now writes to server if file exists. I should probably tie in …
Browse files Browse the repository at this point in the history
…dirp for making new folder structures if they don't…
  • Loading branch information
Flowdeeps committed Apr 1, 2017
1 parent 440d16a commit 02162b9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,15 @@ app.post('/update', function(req, res) {
data: data
}));

fs.writeFile("test/tmp.txt", JSON.stringify(items), function( err ) {
if (err) {
return console.log( err );
}
console.log("file was written");
});

for (item in items) {
console.log(Object.keys(items[item]), items[item]);
// if (item == "snippets") {
// for (snippet in snippets) {
// console.log(snippets[snippet]);
// }
// } else {
// console.log(item);
// }
console.log(item, items[item]);
}

});
Expand Down

0 comments on commit 02162b9

Please sign in to comment.