diff --git a/index.js b/index.js index fde14ee..7250bd9 100644 --- a/index.js +++ b/index.js @@ -4,13 +4,16 @@ const bodyParser = require("body-parser"); const isValidNote = require("./note_validator"); const fs = require("fs"); const path = require("path"); - const cryptojs = require("crypto-js"); require("dotenv").config(); const app = express(); +if (!fs.existsSync("./notes")) { + fs.mkdirSync("./notes"); +} + app.use(bodyParser.json()); app.post("/publish", function (req, res) {