add docker files
This commit is contained in:
parent
a30537f9e7
commit
93a417c5d9
@ -2,7 +2,7 @@
|
||||
FROM node:18
|
||||
|
||||
# Crée un répertoire de travail dans le conteneur
|
||||
WORKDIR /app/src
|
||||
WORKDIR /app
|
||||
|
||||
# Copie les fichiers package.json et package-lock.json pour installer les dépendances
|
||||
COPY src/ .
|
||||
|
||||
@ -6,12 +6,12 @@ const path = require('path');
|
||||
const app = express();
|
||||
|
||||
// Serve static files from the 'src' directory
|
||||
app.use(express.static(path.join(__dirname, 'src')));
|
||||
app.use(express.static(path.join(__dirname, '')));
|
||||
|
||||
// Define a route to serve the HTML file
|
||||
app.get('/', (req, res) => {
|
||||
// Send the HTML file as the response
|
||||
res.sendFile(path.join(__dirname, 'src/index.html'));
|
||||
res.sendFile(path.join(__dirname, 'index.html'));
|
||||
});
|
||||
|
||||
// Start the server
|
||||
|
||||
Loading…
Reference in New Issue
Block a user