Skip to content

solution#19

Closed
igor-kashchenko wants to merge 1 commit intomate-academy:masterfrom
igor-kashchenko:develop
Closed

solution#19
igor-kashchenko wants to merge 1 commit intomate-academy:masterfrom
igor-kashchenko:develop

Conversation

@igor-kashchenko
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@GarryRocksman GarryRocksman left a comment

Choose a reason for hiding this comment

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

GJ 🔥 Just look at the comments, mayby you will finde something to fix

Comment thread src/app.js
Comment on lines +64 to +81
const markup = `
<table>
<thead>
<tr>
<th>Title</th>
<th>Amount</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>${title}</td>
<td>${amount}</td>
<td>${date}</td>
</tr>
</tbody>
</table>
`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i suppouse we need just send well formated JSON ( acording to the task) , but nice sollution with table

Comment thread src/app.js
}

if (pathName === 'format') {
const form = new formidable.IncomingForm();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nice

Comment thread src/app.js

fs.writeFileSync(JSONFile, jsonFields);

const file = fs.createReadStream(JSONFile);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

try-catch ?

Comment thread src/expenses.json
@@ -0,0 +1 @@
{"date":"asdas","title":"asdasd","amount":"asdads"} No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

we need well formated JSON file, and question is - what if you sine form couple of times, new expenses will be added to file or it just overrrides every time?

@igor-kashchenko igor-kashchenko closed this by deleting the head repository Nov 8, 2024
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