Skip to content

done#12

Open
Nazar-Brunarskyi wants to merge 2 commits intomate-academy:masterfrom
Nazar-Brunarskyi:develop
Open

done#12
Nazar-Brunarskyi wants to merge 2 commits intomate-academy:masterfrom
Nazar-Brunarskyi:develop

Conversation

@Nazar-Brunarskyi
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@Oleksandr-Filo Oleksandr-Filo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just a few things - you also have to save data in JSON file
image

Comment thread public/index.html
<head>
<title>Contact us</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<style>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indentations please, it's hard to read this file

Comment thread src/index.js Outdated
const normalizedUrl = new URL(req.url, `http://${req.headers.host}`);
const pathName = normalizedUrl.pathname.slice(1);

if (pathName === '' || pathName === 'index.html') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just add default value to the pathName - const pathName = normalizedUrl.pathname.slice(1) || 'index.html' and check here only one condition

Suggested change
if (pathName === '' || pathName === 'index.html') {
if (pathName === 'index.html') {

Copy link
Copy Markdown

@ivan-kadykalo ivan-kadykalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants