From e9a8ddffde767d9d8a16d9da4ec57535f19c4062 Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Thu, 21 Nov 2024 14:56:39 +0300 Subject: [PATCH] build(docker): create and populate .dockerignore --- .dockerignore | 6 ++++++ server.js | 22 ---------------------- 2 files changed, 6 insertions(+), 22 deletions(-) create mode 100644 .dockerignore delete mode 100644 server.js diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..55fff2b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules +npm-debug.log +.DS_Store +*.log +.git +.env \ No newline at end of file diff --git a/server.js b/server.js deleted file mode 100644 index 3bb91d3..0000000 --- a/server.js +++ /dev/null @@ -1,22 +0,0 @@ -import express from 'express'; -import dotenv from 'dotenv'; -import path from 'path'; // Import the path module -import routes from './src/routes.js'; // Import routes from routes.js -import { validateEnvVariables } from './src/envValidator.js'; - -dotenv.config(); - -validateEnvVariables(); - -const app = express(); -const PORT = process.env.PORT || 3002; - -app.use(express.json()); - -app.use(express.static(path.join(process.cwd(), 'public'))); - -app.use('/', routes); - -app.listen(PORT, () => { - console.log(`Server is running on http://localhost:${PORT}`); -});