formation пре 4 година
родитељ
комит
097f72a4cc
2 измењених фајлова са 11 додато и 8 уклоњено
  1. 3 0
      angular-client/src/app/app.component.ts
  2. 8 8
      express-server/index.js

+ 3 - 0
angular-client/src/app/app.component.ts

@@ -7,4 +7,7 @@ import { Component } from '@angular/core';
 })
 export class AppComponent {
   title = 'fatboar';
+
+  // Link to our api, pointing to api-preprod.foodgame.fr
+  API = 'https://163.172.88.141:4000';
 }

+ 8 - 8
express-server/index.js

@@ -34,14 +34,14 @@ app.use(metricsMiddleware);
 //metrics
 app.use(makeApiMiddleware()); 
 
-//app.get("/api", (req, res) => {
-   // res.status(200).send("Api Works.");
-  //});
-
- var corsOptions = {
-     origin: 'api-preprod.foodgame.fr',
-    optionsSuccessStatus: 200 
-  }
+app.get("/api", (req, res) => {
+    res.status(200).send("Api Works.");
+  });
+
+ //var corsOptions = {
+    // origin: 'api-preprod.foodgame.fr',
+   // optionsSuccessStatus: 200 
+  //}
 
 //Définition des CORS Middleware 
 app.use(function(req, res, next) {