diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-05-12 17:36:04 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-05-12 17:36:04 +0000 |
commit | 454800f23250b038da89bb506326bae1d8c2dfc0 (patch) | |
tree | 8bc26b813188a479fe4ee8b3fb122060c17bf476 /prettier/server.js | |
parent | fixes #6, fixes #7, fixes #9, fixes #11 (diff) | |
download | milla-454800f23250b038da89bb506326bae1d8c2dfc0.tar.gz milla-454800f23250b038da89bb506326bae1d8c2dfc0.zip |
removed the prettier service
Diffstat (limited to '')
-rwxr-xr-x | prettier/server.js | 25 |
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); |