diff --git a/app.js b/app.js index e69de29..af0ee6b 100644 --- a/app.js +++ b/app.js @@ -0,0 +1,29 @@ +const express = require('express'); +const app = express(); +const path = require('path'); + +// Set up static files +app.use(express.static(path.join(__dirname, 'public'))); + +// Routes +app.get('/', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'home.html')); +}); + +app.get('/about', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'about.html')); +}); + +app.get('/works', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'works.html')); +}); + +app.get('/gallery', (req, res) => { + res.sendFile(path.join(__dirname, 'views', 'gallery.html')); +}); + +// Start the server +const PORT = process.env.PORT || 3000; +app.listen(PORT, () => { + console.log(`Server is running on http://localhost:${PORT}`); +});