const express = require('express');
require('dotenv').config();
require('./server/config/database');

const app = express();

app.use(express.json());
app.use(express.urlencoded({ extended: true }));

app.use('/api/auth', require('./server/routes/authroutes'));
app.use('/api/dashboard', require('./server/routes/dashboard'))
app.use('/api/admin', require('./server/routes/adminroutes'));
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
  console.log(`Server is running at http://localhost:${PORT}`);
});
