env not working

This commit is contained in:
Leo
2024-01-17 18:35:29 +08:00
parent f03b2d10aa
commit cafdcf64d0
6 changed files with 546 additions and 2083 deletions

2
consumerWebsite/public/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
node_modules
.env

View File

@ -91,6 +91,7 @@ body {
gap: 15px;
margin-top: 50px;
}
form
input {
height: 60px;

View File

@ -1,4 +1,5 @@
const newAccessKey = '7f7ce777-6a56-4e5e-bfac-3b83c6453e65';
//const newAccessKey = process.env.ACCESS_KEY;
document.addEventListener('DOMContentLoaded', () => {
const form = document.getElementById('form');

View File

@ -1,7 +1,13 @@
const express = require('express');
const dotenv = require('dotenv');
const bodyParser = require('body-parser');
const mysql = require('mysql');
dotenv.config();
app.use(express.static('public'));
const app = express();
const port = 3000;