create-myexam-app 1.0.28 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  "name": "create-myexam-app",
4
4
 
5
- "version": "1.0.28",
5
+ "version": "1.0.29",
6
6
 
7
7
  "description": "My exam projects",
8
8
 
@@ -1,5 +1,3 @@
1
- PORT=5001
2
-
1
+ PORT = 5001
3
2
  MONGO_URI=mongodb://localhost:27017/SMS
4
-
5
3
  JWT_SECRET=your_secret_key_here
@@ -2,7 +2,7 @@ const mongoose = require('mongoose');
2
2
 
3
3
  const connectDB = async () => {
4
4
  try {
5
- await mongoose.connect(process.env.MONGO_URI);
5
+ await mongoose.connect( process.env.MONGO_URI);
6
6
  console.log('MongoDB connected');
7
7
  } catch (error) {
8
8
  console.error('MongoDB connection error:', error);
@@ -1,7 +1,7 @@
1
1
  const bcrypt = require('bcrypt');
2
2
  const jwt = require('jsonwebtoken');
3
3
  const User = require('../models/User');
4
- const JWT_SECRET = process.env.JWT_SECRET;
4
+ const JWT_SECRET = process.env.JWT_SECRET;
5
5
 
6
6
 
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  const jwt = require('jsonwebtoken');
4
4
  const User = require('../models/User');
5
- const JWT_SECRET = process.env.JWT_SECRET;
5
+ const JWT_SECRET = process.env.JWT_SECRET;
6
6
 
7
7
  exports.protect = async (req, res, next) => {
8
8
  try {
@@ -26,7 +26,7 @@ app.use('/api/sales', salesRoutes);
26
26
  app.use('/api/warehouse', warehouseRoutes);
27
27
  app.use('/api/reports', reportRoutes);
28
28
 
29
- const PORT = process.env.PORT || 5001
29
+ const PORT = process.env.PORT || 5001
30
30
  app.listen(PORT, () => {
31
31
  console.log(`Server running on http://localhost:${PORT}`);
32
32
  });