addedlimit to server js
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@ const app = express();
|
|||||||
const port = 4173;
|
const port = 4173;
|
||||||
|
|
||||||
// API endpointleri
|
// API endpointleri
|
||||||
app.post("/frontend-api/data", express.json(), (req, res) => {
|
app.post("/frontend-api/data", express.json({ limit: '20mb' }), (req, res) => {
|
||||||
fs.writeFile(path.join(process.cwd(), "dist", "data.json"), JSON.stringify(req.body, null, 2), (err) => {
|
fs.writeFile(path.join(process.cwd(), "dist", "data.json"), JSON.stringify(req.body, null, 2), (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
res.status(500).send(err.message);
|
res.status(500).send(err.message);
|
||||||
|
|||||||
Reference in New Issue
Block a user