mortgage-calculator's People
mortgage-calculator's Issues
Code review
- I'd prefer to extract port to config
Line 8 in 5f8894e
- You may remove this collection and read it from the disk at server start
mortgage-calculator/nodeJs/server.js
Lines 18 to 22 in 5f8894e
- Rewrite this
mortgage-calculator/nodeJs/server.js
Lines 29 to 33 in 5f8894e
to following:
const _reqMethods = {
GET: handleGetRequest,
POST: handlePostRequest,
DELETE: handleDeleteRequest,
};
- You can rewrite
mortgage-calculator/nodeJs/server.js
Line 55 in 5f8894e
const [, extention] = name.split('.');
- Why let and bad naming:
mortgage-calculator/nodeJs/server.js
Line 48 in 5f8894e
better:const { url } = req;
- Do not rewrite values if possible:
mortgage-calculator/nodeJs/server.js
Line 50 in 5f8894e
- When you use code block
{}
inelse
branch, you should use block in positive if branch as wellmortgage-calculator/nodeJs/server.js
Lines 58 to 62 in 5f8894e
- get and post handlers contains duplicate code:
mortgage-calculator/nodeJs/server.js
Lines 47 to 95 in 5f8894e
- Instead of this
mortgage-calculator/nodeJs/server.js
Lines 70 to 75 in 5f8894e
you can use for await: https://github.com/HowProgrammingWorks/DDD/blob/master/JavaScript/2-controller/body.js - Terrible mix of http-aware, db-aware, and domain logic code:
mortgage-calculator/nodeJs/server.js
Lines 77 to 93 in 5f8894e
- Use
for..of
andArray.prototype.entries()
instead ofmortgage-calculator/nodeJs/server.js
Lines 114 to 119 in 5f8894e
- Duplicate code :
mortgage-calculator/nodeJs/server.js
Lines 130 to 135 in 5f8894e
- SQL-injection:
mortgage-calculator/nodeJs/database.js
Line 64 in 5f8894e
- Use eslint and prettier for code consistency autoformatting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.