You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

15 lines
406 B

const express = require('express');
const authRoutes = require('./routes/authRoute');
const protectedRoutes = require('./routes/protectedRoute');
require('dotenv').config();
const app = express();
app.use(express.json());
app.use('/api/auth', authRoutes);
app.use('/api/protected', protectedRoutes);
app.listen(process.env.PORT, () => {
console.log(`Server running on port ${process.env.PORT}`);
});