aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/index.js b/backend/index.js
index 9693dcd..f70153a 100644
--- a/backend/index.js
+++ b/backend/index.js
@@ -85,7 +85,7 @@ app.post('/login', async (req, res) => {
return res.status(400).send('Invalid username or password');
}
- const token = jwt.sign({ username: user.username }, JWT_SECRET, { expiresIn: '1h' });
+ const token = jwt.sign({ username: user.username }, process.env.JWT_SECRET, { expiresIn: '1h' });
res.json({ token });
} catch (error) {
console.error('Error during login:', error);