
- Express server with routes for index and API endpoints - CRUD operations for markdown journals via REST API - Modular view components (header, main, footer, page) - UUID-based file management system for journals - Content-editable journal editor with AI assistant features - Package.json with express and uuid dependencies - Basic project structure with assets, config, tests, views directories 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
498 B
JavaScript
20 lines
498 B
JavaScript
const express = require('express');
|
|
const path = require('path');
|
|
|
|
const indexRoutes = require('./routes/index');
|
|
const apiRoutes = require('./routes/api');
|
|
|
|
const app = express();
|
|
const port = process.env.PORT || 3000;
|
|
|
|
app.use(express.json());
|
|
app.use(express.urlencoded({ extended: true }));
|
|
|
|
app.use('/assets', express.static(path.join(__dirname, 'assets')));
|
|
|
|
app.use('/', indexRoutes);
|
|
app.use('/api', apiRoutes);
|
|
|
|
app.listen(port, () => {
|
|
console.log(`Server running on port ${port}`);
|
|
}); |