const fs = require('fs')
const express = require('express')
const app = express()
const bodyParser = require('body-parser')

app.use(bodyParser.json())
app.use(bodyParser.urlencoded({extended: true}));
app.use(express.static('./static_prod'))

app.post('/save', (req, res)=> {
    fs.writeFile("./ugnis_components/app-" + uuid.v4() + '.json', JSON.stringify(req.body, undefined, 4), function(err) {
        if(err) {
            return console.log(err);
        }

        console.log("The file was saved!");
    });
    res.send('OK')
})

app.listen(3000, ()=> {
    console.log('Listening on port 3000')
})
@@ -237,16 +237,19 @@
 rod'))%0A%0A
+// 
 app.post
@@ -269,24 +269,27 @@
 q, res)=%3E %7B%0A
+// 
     fs.write
@@ -390,32 +390,35 @@
 function(err) %7B%0A
+// 
         if(err) 
@@ -419,16 +419,19 @@
 (err) %7B%0A
+// 
         
@@ -459,16 +459,19 @@
 g(err);%0A
+// 
         
@@ -472,17 +472,22 @@
       %7D%0A
-%0A
+//%0A// 
         
@@ -526,16 +526,19 @@
 %22);%0A
+// 
     %7D);%0A
     
@@ -533,16 +533,19 @@
     %7D);%0A
+// 
     res.
@@ -555,16 +555,19 @@
 d('OK')%0A
+// 
 %7D)%0A%0Aapp.

comment out app saving