This commit is contained in:
adueck 2023-01-30 00:54:20 +05:00
parent 78d3f56319
commit ff63806fc6
2 changed files with 7 additions and 5 deletions

View File

@ -33,16 +33,18 @@ app.get("/test", cors(), (req, res) => {
res.send({ ok: true });
});
// Web Interface - returning html (mostly)
// Dictionary API
app.options("/dictionary", cors());
app.use("/dictionary", cors(), dictionaryRouter);
// Web Interface - returning html (mostly)
app.use("/", cors(sameOriginCorsOpts), authRouter(passport));
// REST API - returning json
app.use("/api", cors(sameOriginCorsOpts), apiRouter);
app.use("/feedback", cors(sameOriginCorsOpts), feedbackRouter);
// TODO: check - does this work with the cors ?
app.use("/payment", cors(sameOriginCorsOpts), paymentRouter);
// Dictionary API
app.options("/dictionary", cors());
app.use("/dictionary", cors(), dictionaryRouter);
// START 💨 //
app.listen(4000, () => console.log("Server Has Started on 4000"));

View File

@ -1,4 +1,4 @@
POST https://account.lingdocs.com/dictionary/script-to-phonetics HTTP/1.1
GET https://account.lingdocs.com/test HTTP/1.1
content-type: application/json
{