Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
8d4abe4
Update README.md
sayataktahu Jun 10, 2024
a1526c8
section
adlinarosli Jun 10, 2024
016a0fb
name, matric no
adlinarosli Jun 10, 2024
d259b1b
test
Amiraazhari Jun 10, 2024
0dbf093
name
sayataktahu Jun 10, 2024
b3cad75
Q1
sayataktahu Jun 10, 2024
8d32a88
file
sayataktahu Jun 10, 2024
c0b4d63
Q2
sayataktahu Jun 10, 2024
b4962b8
Q2
sayataktahu Jun 10, 2024
eeb0fbe
Q2
sayataktahu Jun 10, 2024
38e3bb0
Q3
sayataktahu Jun 10, 2024
795c1fa
Co-authored-by: adlinarosli <adlinarosli@users.noreply.github.com>
sayataktahu Jun 10, 2024
17a45e5
terminal q1
sayataktahu Jun 10, 2024
b01fb1a
Co-authored-by: adlinarosli <adlinarosli@users.noreply.github.com>
sayataktahu Jun 10, 2024
d9fb129
Co-authored-by: adlinarosli <adlinarosli@users.noreply.github.com>
sayataktahu Jun 10, 2024
849dc74
Co-authored-by: Amiraazhari <Amiraazhari@users.noreply.github.com>
sayataktahu Jun 10, 2024
13f9785
exploring terminal
sayataktahu Jun 10, 2024
7143bdd
explore terminal
sayataktahu Jun 10, 2024
83238ff
terminal explore
sayataktahu Jun 10, 2024
30198c2
commit
sayataktahu Jun 10, 2024
0cd2f66
debian
sayataktahu Jun 25, 2024
549c863
drwxrwxrwx+ 2 codespace codespace 4096 Jun 25 03:51
sayataktahu Jun 25, 2024
041f514
link
sayataktahu Jun 25, 2024
6adfa6c
link
sayataktahu Jun 25, 2024
d398b9d
link
sayataktahu Jun 25, 2024
3a32153
Q2
sayataktahu Jun 25, 2024
e1dd4a6
Q2
sayataktahu Jun 25, 2024
cad78e8
Q2
sayataktahu Jun 25, 2024
32a4785
q2
sayataktahu Jun 25, 2024
499f80e
Q2
sayataktahu Jun 25, 2024
058b76b
Q1 n Q2
sayataktahu Jun 25, 2024
47735ac
try
sayataktahu Jun 25, 2024
7980e4d
running own container
sayataktahu Jun 26, 2024
dfb9423
-
sayataktahu Jun 26, 2024
205bbda
website
sayataktahu Jun 27, 2024
a407eb2
website
sayataktahu Jun 27, 2024
b317c6d
this is my commit
sayataktahu Jun 27, 2024
b99303e
commit
sayataktahu Jun 27, 2024
51d9948
commit
sayataktahu Jun 27, 2024
ede338c
commit
sayataktahu Jun 28, 2024
137a423
commit
sayataktahu Jun 28, 2024
3ad667a
commit
sayataktahu Jun 28, 2024
79847ce
commit
sayataktahu Jun 28, 2024
16da949
commit
sayataktahu Jun 28, 2024
d3fe14f
commit
sayataktahu Jun 28, 2024
20eba73
commit
sayataktahu Jun 28, 2024
d1d3771
commit
sayataktahu Jun 28, 2024
51d0198
commit
sayataktahu Jun 28, 2024
7e952d0
commit
sayataktahu Jun 28, 2024
3ecb904
comi
sayataktahu Jun 28, 2024
3d4754d
commit
sayataktahu Jun 28, 2024
ca1eeba
commit
sayataktahu Jun 28, 2024
8761c52
commit
sayataktahu Jun 28, 2024
06293bd
commit
sayataktahu Jun 28, 2024
a0ac189
commit
sayataktahu Jun 28, 2024
6d38c88
commit
sayataktahu Jun 28, 2024
f7b86c7
commit
sayataktahu Jun 28, 2024
39321a1
commit
sayataktahu Jun 29, 2024
623f85b
commit
sayataktahu Jun 29, 2024
323e8d6
commit
sayataktahu Jun 29, 2024
e1b776c
commit
sayataktahu Jun 29, 2024
c603d37
commit
sayataktahu Jun 29, 2024
bbec98b
commit
sayataktahu Jun 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
595 changes: 545 additions & 50 deletions README.md

Large diffs are not rendered by default.

Binary file added images/ourWebsite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ping1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ping2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/step5_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/subnetwork_Q2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/subnetwork_Q5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/website_Q1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions nodejs-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Use the official Node.js image
FROM node:14

# Create and change to the app directory
WORKDIR /usr/src/app

# Copy application dependency manifests to the container image
COPY package*.json ./

# Install production dependencies
RUN npm install

# Copy local code to the container image
COPY . .

# Run the web service on container startup
CMD [ "node", "index.js" ]
40 changes: 40 additions & 0 deletions nodejs-app/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const express = require('express');
const mysql = require('mysql');

const app = express();
const port = 3000;

// Create a MySQL connection
const connection = mysql.createConnection({
host: 'mysql-container',
user: 'myuser',
password: 'mypassword',
database: 'mydatabase'
});

// Connect to MySQL
connection.connect((err) => {
if (err) {
console.error('Error connecting to MySQL:', err);
return;
}
console.log('Connected to MySQL');
});

// Define a route to get a random row
app.get('/random', (req, res) => {
const query = 'SELECT * FROM mytable ORDER BY RAND() LIMIT 1';
connection.query(query, (err, results) => {
if (err) {
console.error('Error executing query:', err);
res.status(500).send('Server Error');
return;
}
res.json(results[0]);
});
});

// Start the server
app.listen(port, () => {
console.log(`Server running at http://localhost:${port}`);
});
1 change: 1 addition & 0 deletions nodejs-app/node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading