Commit 6b333943 authored by Dennis Willers's avatar Dennis Willers 🏀

Mask Database Information

parent 01a9fdf5
Pipeline #434 failed with stages
in 27 seconds
DB_HOST=
DB_PORT=
DB_USER=
DB_PASS=
DB_DATABASE=
......@@ -44,3 +44,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db
# Ignore env
.env
......@@ -5,6 +5,10 @@ stages:
- delete
- deploy
before_script:
- chmod +x ./setup_env.sh
- ./setup_env.sh
docker-build:
stage: build
script:
......
require('./socket');
require('dotenv').config();
const express = require('express');
const cors = require('cors');
const bodyParser = require('body-parser');
......@@ -6,11 +7,11 @@ const mysql = require('mysql');
const events = require('./events');
const connection = mysql.createConnection({
host : '192.168.0.50',
port : '3307',
user : 'votingApp',
password : 'R0b0TecDev!',
database : 'Voting',
host : process.env.DB_HOST,
port : process.env.DB_PORT,
user : process.env.DB_USER,
password : process.env.DB_PASS,
database : process.env.DB_DATABASE,
multipleStatements: true,
});
......
This diff is collapsed.
......@@ -14,6 +14,7 @@
"dependencies": {
"axios": "^0.21.1",
"cors": "^2.8.5",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"mysql": "^2.18.1"
},
......
#!/bin/bash
echo DB_HOST=$DB_HOST >> .env
echo DB_PORT=$DB_PORT >> .env
echo DB_USER=$DB_USER >> .env
echo DB_PASS=$DB_PASS >> .env
echo DB_DATABASE=$DB_DATABASE >> .env
......@@ -254,7 +254,7 @@ client.on('data',function(data){
// 87.78.129.86 | localhost
/*const testClient = net.connect({host: '87.78.129.86', port: 3201}, () => {
const testClient = net.connect({host: 'localhost', port: 3000}, () => {
console.log('connected to server!');
//testClient.write('Hello World Client!\r\n');
testClient.write(JSON.stringify({"mapId":"7fsfRSUCQ7YwfBEdRk_GivW6qzj","userId":"aKBNg9fbReqLedLiz1KFfA","name":"Summer 2021 - 01"}));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment