myemma / server.js
nroggendorff's picture
Create server.js
8836628 verified
raw
history blame
353 Bytes
const express = require('express');
const path = require('path');
const app = express();
const port = 3000;
app.use(express.static(path.join(__dirname, 'public')));
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'index.html'));
});
app.listen(port, () => {
console.log(`Server running on http://localhost:${port}`);
});