Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
99 changes: 72 additions & 27 deletions package-lock.json

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

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,20 @@
"devDependencies": {
"@faker-js/faker": "^8.4.1",
"@mate-academy/eslint-config": "latest",
"@mate-academy/scripts": "^1.8.6",
"@mate-academy/scripts": "2.1.2",
"axios": "^1.7.2",
"eslint": "^8.57.0",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-node": "^11.1.0",
"form-data": "^4.0.0",
"formidable": "^3.5.1",
"formidable": "3.5.4",
"jest": "^29.7.0",
"prettier": "^3.3.2"
},
"mateAcademy": {
"projectType": "javascript"
},
"dependencies": {
"mime-types": "3.0.1"
}
}
Binary file added public/favicon.ico
Binary file not shown.
32 changes: 32 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Compression App</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="main-container">
<h1 class="main-header">Welcome to Free Compression Server</h1>

<form
class="input-form"
method="post"
enctype="multipart/form-data"
action="http://localhost:5700/compress"
>
<input type="file" name="file" id="file" required />
<select name="compressionType" id="compressionTypeSelect" required>
<option value="" selected disabled>
Please choose a compression type
</option>
<option value="gzip" selected>gzip</option>
<option value="deflate">deflate</option>
<option value="br">br</option>
</select>
<button type="submit">Compress!</button>
</form>
</div>
</body>
</html>
24 changes: 24 additions & 0 deletions public/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
body {
padding: 0;
margin: 0;
}

.main-header {
font-size: 36px;
line-height: 140%;
margin-bottom: 40px;
}

.main-container {
height: 100vh;
width: 100vw;
padding: 2em;

color: white;
box-sizing: border-box;
background-color: tan;

font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
line-height: 100%;
}
3 changes: 3 additions & 0 deletions public/uploads/prize.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Audentia conitor vulgaris excepturi vehemens adicio aliquid supellex auctor tenetur. Causa solutio ex deficio demulceo solium tamisium. Amplus cupressus tremo demoror aestus.
Deputo denuo caste spoliatio. Cedo congregatio cohors verumtamen admoneo unde bellicus delego. Cohors triduana accusator curo damnatio doloribus.
Suggero cedo creptio quae. Repudiandae vergo absque cupiditas. Deripio celo tantillus.
Loading
Loading