feat: basic entry point and health check

This commit is contained in:
Erwin
2026-03-28 03:14:22 +00:00
parent e123bf596b
commit 0e244d2b30

36
src/index.js Normal file
View File

@@ -0,0 +1,36 @@
/**
* SimpleNote Web - Entry Point
* Document management API with nested libraries and markdown support
*/
import express from 'express';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const app = express();
const PORT = process.env.PORT || 3000;
// Middleware
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
// Health check
app.get('/health', (req, res) => {
res.json({ status: 'ok', timestamp: new Date().toISOString() });
});
// TODO: Routes
// - /api/documents
// - /api/libraries
// - /api/tags
// - /api/auth
// Start server
app.listen(PORT, () => {
console.log(`SimpleNote Web running on port ${PORT}`);
});
export default app;