diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..a2fc36e --- /dev/null +++ b/src/index.js @@ -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;