Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Voting
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dennis Willers
Voting
Commits
6b333943
Commit
6b333943
authored
Aug 22, 2021
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mask Database Information
parent
01a9fdf5
Pipeline
#434
failed with stages
in 27 seconds
Changes
8
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
1884 deletions
+41
-1884
.env.example
.env.example
+5
-0
.gitignore
.gitignore
+3
-0
.gitlab-ci.yml
.gitlab-ci.yml
+4
-0
index.js
index.js
+6
-5
package-lock.json
package-lock.json
+14
-1878
package.json
package.json
+1
-0
setup_env.sh
setup_env.sh
+7
-0
socket.js
socket.js
+1
-1
No files found.
.env.example
0 → 100644
View file @
6b333943
DB_HOST=
DB_PORT=
DB_USER=
DB_PASS=
DB_DATABASE=
.gitignore
View file @
6b333943
...
...
@@ -44,3 +44,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db
# Ignore env
.env
.gitlab-ci.yml
View file @
6b333943
...
...
@@ -5,6 +5,10 @@ stages:
-
delete
-
deploy
before_script
:
-
chmod +x ./setup_env.sh
-
./setup_env.sh
docker-build
:
stage
:
build
script
:
...
...
index.js
View file @
6b333943
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
,
});
...
...
package-lock.json
View file @
6b333943
This diff is collapsed.
Click to expand it.
package.json
View file @
6b333943
...
...
@@ -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
"
},
...
...
setup_env.sh
0 → 100644
View file @
6b333943
#!/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
socket.js
View file @
6b333943
...
...
@@ -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
"
}));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment