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

Commit

Permalink
Standarize app
Browse files Browse the repository at this point in the history
  • Loading branch information
WiolaWysopal committed Mar 2, 2024
1 parent 5e19898 commit d6be8ef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const dodaj = require('./dodaj')

const server = http.createServer(function(request, response) {
if (request.method == 'POST') {
// Nie potrzebujemy przetwarzać danych wejściowych od użytkownika
const result = dodaj.add100();
var resultPage = `
<html>
Expand All @@ -14,10 +13,10 @@ const server = http.createServer(function(request, response) {
</head>
<body>
<div class="container mt-5">
<h1 class="text-center">Wynik: ${result}</h1>
<h1 class="text-center">Result: ${result}</h1>
<div class="row justify-content-center">
<div class="col-md-4 text-center">
<a href="/" class="btn btn-primary">Powrót do strony głównej</a>
<a href="/" class="btn btn-primary">Back to main page</a>
</div>
</div>
</div>
Expand All @@ -38,7 +37,7 @@ const server = http.createServer(function(request, response) {
<body>
<div class="container mt-5">
<h1 class="text-center">Node.js Number Adder</h1>
<p class="text-center">Kliknij przycisk poniżej, aby dodać liczby od 1 do 100.</p>
<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">
Expand Down

0 comments on commit d6be8ef

Please sign in to comment.