aboutsummaryrefslogtreecommitdiffstats
path: root/prettier/server.js
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-05-12 17:36:04 +0000
committerterminaldweller <devi@terminaldweller.com>2024-05-12 17:36:04 +0000
commit454800f23250b038da89bb506326bae1d8c2dfc0 (patch)
tree8bc26b813188a479fe4ee8b3fb122060c17bf476 /prettier/server.js
parentfixes #6, fixes #7, fixes #9, fixes #11 (diff)
downloadmilla-454800f23250b038da89bb506326bae1d8c2dfc0.tar.gz
milla-454800f23250b038da89bb506326bae1d8c2dfc0.zip
removed the prettier service
Diffstat (limited to '')
-rwxr-xr-xprettier/server.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/prettier/server.js b/prettier/server.js
deleted file mode 100755
index d752046..0000000
--- a/prettier/server.js
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env node
-"use strict";
-
-const express = require("express");
-const prettier = require("prettier");
-
-const app = express();
-app.use(express.json());
-
-// app.use((req, res, next) => {
-// res.append("Access-Control-Allow-Origin", ["*"]);
-// res.append("Access-Control-Allow-Methods", "POST", "OPTIONS");
-// res.append("Access-Control-Allow-Headers", "Content-Type");
-// next();
-// });
-
-app.post("/api/v1/format", async function (req, res) {
- const formattedText = await prettier.format(req.body["content"], {
- parser: "babel",
- });
- res.set("Content-Type", "application/json");
- res.json({ formattedText: formattedText });
-});
-
-app.listen(9001);