build(docker): create and populate .dockerignore
This commit is contained in:
parent
db60f11f6e
commit
e9a8ddffde
|
@ -0,0 +1,6 @@
|
||||||
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
|
.DS_Store
|
||||||
|
*.log
|
||||||
|
.git
|
||||||
|
.env
|
22
server.js
22
server.js
|
@ -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}`);
|
|
||||||
});
|
|
Loading…
Reference in New Issue