Add installer script and serve static files
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
require('dotenv').config();
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const cors = require('cors');
|
||||
const { Pool } = require('pg');
|
||||
const { exec } = require('child_process');
|
||||
@@ -10,6 +11,9 @@ const PORT = process.env.PORT || 3000;
|
||||
app.use(cors());
|
||||
app.use(express.json());
|
||||
|
||||
// Serve static files from the parent directory (frontend)
|
||||
app.use(express.static(path.join(__dirname, '../')));
|
||||
|
||||
// Database Connection Pool (PostgreSQL)
|
||||
const pool = new Pool({
|
||||
host: process.env.DB_HOST || 'localhost',
|
||||
|
||||
Reference in New Issue
Block a user