diff --git a/account/src/index.ts b/account/src/index.ts index 8f82d4f..549eb16 100644 --- a/account/src/index.ts +++ b/account/src/index.ts @@ -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")); diff --git a/account/test.http b/account/test.http index 00b330f..094ca0c 100644 --- a/account/test.http +++ b/account/test.http @@ -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 {