🚀 Korea Tourism Agency - Complete implementation
✨ Features: - Modern tourism website with responsive design - AdminJS admin panel with image editor integration - PostgreSQL database with comprehensive schema - Docker containerization - Image upload and gallery management 🛠 Tech Stack: - Backend: Node.js + Express.js - Database: PostgreSQL 13+ - Frontend: HTML/CSS/JS with responsive design - Admin: AdminJS with custom components - Deployment: Docker + Docker Compose - Image Processing: Sharp with optimization 📱 Admin Features: - Routes/Tours management (city, mountain, fishing) - Guides profiles with specializations - Articles and blog system - Image editor with upload/gallery/URL options - User management and authentication - Responsive admin interface 🎨 Design: - Korean tourism focused branding - Mobile-first responsive design - Custom CSS with modern aesthetics - Image optimization and gallery - SEO-friendly structure 🔒 Security: - Helmet.js security headers - bcrypt password hashing - Input validation and sanitization - CORS protection - Environment variables
This commit is contained in:
16
src/app.js
16
src/app.js
@@ -43,7 +43,7 @@ app.use(helmet({
|
||||
defaultSrc: ["'self'"],
|
||||
styleSrc: ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com", "https://cdn.jsdelivr.net", "https://cdnjs.cloudflare.com"],
|
||||
fontSrc: ["'self'", "https://fonts.gstatic.com", "https://cdnjs.cloudflare.com"],
|
||||
scriptSrc: ["'self'", "'unsafe-inline'", "https://cdn.jsdelivr.net", "https://cdnjs.cloudflare.com", "https://code.jquery.com"],
|
||||
scriptSrc: ["'self'", "'unsafe-inline'", "'unsafe-eval'", "https://cdn.jsdelivr.net", "https://cdnjs.cloudflare.com", "https://code.jquery.com"],
|
||||
imgSrc: ["'self'", "data:", "https:", "blob:"],
|
||||
connectSrc: ["'self'"],
|
||||
},
|
||||
@@ -159,6 +159,8 @@ const articlesRouter = (await import('./routes/articles.js')).default;
|
||||
const apiRouter = (await import('./routes/api.js')).default;
|
||||
const settingsRouter = (await import('./routes/settings.js')).default;
|
||||
const ratingsRouter = (await import('./routes/ratings.js')).default;
|
||||
const imagesRouter = (await import('./routes/images.js')).default;
|
||||
const crudRouter = (await import('./routes/crud.js')).default;
|
||||
|
||||
app.use('/', indexRouter);
|
||||
app.use('/routes', toursRouter);
|
||||
@@ -167,6 +169,8 @@ app.use('/articles', articlesRouter);
|
||||
app.use('/api', apiRouter);
|
||||
app.use('/api', ratingsRouter);
|
||||
app.use('/', settingsRouter); // Settings routes (CSS and API)
|
||||
app.use('/api/images', imagesRouter); // Image management routes
|
||||
app.use('/api/crud', crudRouter); // CRUD API routes
|
||||
|
||||
// Health check endpoint
|
||||
app.get('/health', (req, res) => {
|
||||
@@ -177,6 +181,16 @@ app.get('/health', (req, res) => {
|
||||
});
|
||||
});
|
||||
|
||||
// Test image editor endpoint
|
||||
app.get('/test-editor', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../public/test-editor.html'));
|
||||
});
|
||||
|
||||
// Image system documentation
|
||||
app.get('/image-docs', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, '../public/image-system-docs.html'));
|
||||
});
|
||||
|
||||
// Error handling
|
||||
app.use((req, res) => {
|
||||
res.status(404).render('error', {
|
||||
|
||||
Reference in New Issue
Block a user