27 lines
No EOL
569 B
JavaScript
27 lines
No EOL
569 B
JavaScript
import express from 'express';
|
|
import cors from 'cors';
|
|
import dotenv from 'dotenv';
|
|
dotenv.config();
|
|
import { routes } from './router/routes.js';
|
|
|
|
const app = express();
|
|
|
|
const corsOptions = {
|
|
origin: [
|
|
"http://localhost:5173",
|
|
"https://shift-dev.code-catalyst.com",
|
|
"https://shift.code-catalyst.com"
|
|
]
|
|
};
|
|
|
|
app.use(cors(corsOptions));
|
|
app.use(express.json({ limit: '10mb' }));
|
|
app.use('/api', routes);
|
|
|
|
app.get('*route', (req, res) => {
|
|
res.send("Hello from ShiftSync");
|
|
});
|
|
|
|
app.listen(5172, () => {
|
|
console.log('Server Started on port 5172');
|
|
}); |