- Added package.json for project dependencies and scripts - Configured PostCSS with Tailwind CSS - Created global styles and theme context for dark mode support - Implemented layout and routing for internationalization using next-intl - Developed main components: Header, Footer, Hero, About, Skills, Projects, Contact - Added language switcher and contact form with validation - Created project card component to display project details - Set up localization files for English and Portuguese - Configured Tailwind CSS for styling and responsive design - Added favicon and logo assets
26 lines
699 B
JavaScript
26 lines
699 B
JavaScript
require('dotenv').config();
|
|
const express = require('express');
|
|
const cors = require('cors');
|
|
const emailRoutes = require('./routes/email');
|
|
|
|
const app = express();
|
|
const PORT = process.env.BACKEND_PORT || 3001;
|
|
|
|
// Middleware
|
|
app.use(cors({
|
|
origin: process.env.FRONTEND_URL || 'http://localhost:3000', // Adjust for your frontend URL
|
|
}));
|
|
app.use(express.json());
|
|
|
|
|
|
|
|
// Routes
|
|
app.use('/api/email', emailRoutes); // All email routes will be prefixed with /api/email
|
|
|
|
app.get('/api/health', (req, res) => { // Health check endpoint
|
|
res.status(200).json({ status: 'UP', message: 'Backend is running' });
|
|
});
|
|
|
|
app.listen(PORT, () => {
|
|
console.log(`Backend server running on port ${PORT}`);
|
|
}); |