ahhh
This commit is contained in:
parent
78d3f56319
commit
ff63806fc6
|
@ -33,16 +33,18 @@ app.get("/test", cors(), (req, res) => {
|
||||||
res.send({ ok: true });
|
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));
|
app.use("/", cors(sameOriginCorsOpts), authRouter(passport));
|
||||||
// REST API - returning json
|
// REST API - returning json
|
||||||
app.use("/api", cors(sameOriginCorsOpts), apiRouter);
|
app.use("/api", cors(sameOriginCorsOpts), apiRouter);
|
||||||
app.use("/feedback", cors(sameOriginCorsOpts), feedbackRouter);
|
app.use("/feedback", cors(sameOriginCorsOpts), feedbackRouter);
|
||||||
// TODO: check - does this work with the cors ?
|
// TODO: check - does this work with the cors ?
|
||||||
app.use("/payment", cors(sameOriginCorsOpts), paymentRouter);
|
app.use("/payment", cors(sameOriginCorsOpts), paymentRouter);
|
||||||
// Dictionary API
|
|
||||||
app.options("/dictionary", cors());
|
|
||||||
app.use("/dictionary", cors(), dictionaryRouter);
|
|
||||||
|
|
||||||
// START 💨 //
|
// START 💨 //
|
||||||
app.listen(4000, () => console.log("Server Has Started on 4000"));
|
app.listen(4000, () => console.log("Server Has Started on 4000"));
|
||||||
|
|
|
@ -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
|
content-type: application/json
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue