From 405f22ddf51a932b2abf4e1785feabaea891d458 Mon Sep 17 00:00:00 2001
From: Gringo <timothe.barthez@student-cs.fr>
Date: Wed, 25 Dec 2019 19:10:12 +0100
Subject: [PATCH] fix

---
 app.js       | 2 +-
 package.json | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/app.js b/app.js
index 4ee72d6..803f837 100644
--- a/app.js
+++ b/app.js
@@ -45,7 +45,7 @@ app.use(server_session);
 store.sync()
 
 // Auth middleware
-let redirect_uri = process.env.NODE_ENV === "development" ? 'http://localhost:3000/auth' : 'http://graphe_des_assos.cs-campus.fr';
+let redirect_uri = process.env.NODE_ENV === "development" ? 'http://localhost:3000/auth' : 'https://graphe_des_assos.cs-campus.fr';
 function auth (req, res, next) {
   if (req.session
     && req.session.expires_at
diff --git a/package.json b/package.json
index 396bce5..7a8a32a 100644
--- a/package.json
+++ b/package.json
@@ -3,7 +3,8 @@
   "version": "0.0.0",
   "private": true,
   "scripts": {
-    "start": "node ./bin/www"
+    "dev": "NODE_ENV='development' node ./bin/www",
+    "start": "npx pm2 start ./bin/www"
   },
   "dependencies": {
     "axios": "^0.19.0",
-- 
GitLab