Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Prepare app for AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
WiolaWysopal committed Mar 2, 2024
1 parent d6be8ef commit fd6d496
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 7 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const server = http.createServer(function(request, response) {
<head>
<meta charset="UTF-8">
<title>Node.js Number Adder</title>
<!-- Dołączanie Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
Expand All @@ -40,7 +39,7 @@ const server = http.createServer(function(request, response) {
<p class="text-center">Click the button below to add numbers from 1 to 100.</p>
<div class="row justify-content-center">
<div class="col-md-4 text-center">
<form method="post" action="http://localhost:3000">
<form method="post">
<input type="submit" class="btn btn-primary btn-lg" value="Add numbers from 1 to 100" />
</form>
</div>
Expand All @@ -54,7 +53,9 @@ const server = http.createServer(function(request, response) {
}
})

const port = 3000
const host = '127.0.0.1'
server.listen(port, host)
console.log(`Listening at http://${host}:${port}`)
const PORT = process.env.PORT || 3000;
server.listen(PORT, () => {
console.log(`Server is running on port localhost:${PORT}`);
});


3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "GitHubActions in development process",
"main": "index.js",
"scripts": {
"start": "node index.js",
"test": "jest"
},
},
"repository": {
"type": "git",
"url": "git+https://github.com/WiolaWysopal/GitHubActions.git"
Expand Down

0 comments on commit fd6d496

Please sign in to comment.