Skip to content

Commit

Permalink
fixing tests and optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Kurdila authored and Justin Kurdila committed Jul 5, 2024
1 parent 8c0479a commit 039e6e3
Show file tree
Hide file tree
Showing 10 changed files with 12,297 additions and 12,708 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
- name: Run jest tests
run: npm run jest
run: npm run test
2 changes: 0 additions & 2 deletions backend/.env

This file was deleted.

6 changes: 3 additions & 3 deletions backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const express = require('express');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
const cors = require('cors');
require('dotenv').config();
const { PORT, MONGO_URI } = require('../frontend/src/config');

const app = express();

Expand All @@ -11,7 +11,7 @@ app.use(bodyParser.json());
app.use(cors());

// Connect to MongoDB
mongoose.connect(process.env.MONGO_URI);
mongoose.connect(MONGO_URI);

const db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
Expand All @@ -25,5 +25,5 @@ const itemRoutes = require('./routes/itemRoutes');
// Use routes
app.use('/api', itemRoutes);

const port = process.env.PORT || 5000;
const port = PORT || PORT;
app.listen(port, () => console.log(`Server running on port ${port}`));
Loading

0 comments on commit 039e6e3

Please sign in to comment.