Skip to content

Commit

Permalink
11/04/2024 10:36
Browse files Browse the repository at this point in the history
Public file change
  • Loading branch information
jack03042 committed Apr 11, 2024
1 parent 33538a6 commit acebf13
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
18 changes: 18 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const express = require('express');
const path = require('path');
require('dotenv').config();

const app = express();
const port = process.env.PORT || 3000;

// Serve static files from the 'public' directory
app.use(express.static('public'));

// Send the main index.html file in response to any route not handled above
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, 'public/index.html'));
});

app.listen(port, () => {
console.log(`Server running on port ${port}`);
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit acebf13

Please sign in to comment.