mirror of
https://github.com/artegoser/AnoPaper.git
synced 2024-11-25 05:16:21 +03:00
fix: dir creation
This commit is contained in:
parent
bff9c3875c
commit
551190066a
1 changed files with 4 additions and 1 deletions
5
index.js
5
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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue