microservicesample's People
microservicesample's Issues
I think a formatter like prettier would have also been very useful
There are a lot of blank lines and misaligned spaces in a lot of places. Again easy problem to overlook, but it's also easy to fix.
Why define the controller functions as methods on the global object?
If I'm not mistaken. These functions (handlers) will be assigned to methods on the global object. Why not just use a const
before the name of the handler?
HTTP API doesn't look very RESTful
MicroserviceSample/saleService/routes/customerRoute.js
Lines 6 to 9 in 5682ed3
This is not a RESTful API in my opinion. An actual RESTful HTTP API for this resource with your controllers would look like this:
router.get('/customer', customerController.listHandler);
router.post('/customer', customerValidator.validateCreate, customerController.createHandler);
router.patch('/customer', customerValidator.validateUpdate, customerController.updateHandler);
router.delete('/customer', customerValidator.validateDelete, customerController.deleteHandler);
Probably would have been a good idea to set up Eslint
Why let
? I mean these are small issues that can even be solved using static analysis of the code and they are in other places in the repo as well. I won't comment on all of them, but Eslint would have been able to catch these little mistakes and even fix them automatically.
Another example:
Would be nicer to have _
for the unused variable.
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.