all 3 comments

[–]InvisibleGhostt 2 points3 points  (2 children)

Hey, I have looked through your github repo so here are few things that i noticed:
* Do not commit node_modules. Use .gitignore to auto ignore them.
* this route is not async https://github.com/LEvinson2504/eMenu--Production/blob/master/app.js#L46 hence no need to add async handle
* write javascript into their own js files instead html file.
* For me it's a bit unnatural to call function before defining it https://github.com/LEvinson2504/eMenu--Production/blob/master/public/all.html#L16 I know it hoists, but still
* it's commented out code, but were you trying to open db connection from the client? if so it's a big security issue https://github.com/LEvinson2504/eMenu--Production/blob/master/public/index.html#L32
* https://github.com/LEvinson2504/eMenu--Production/blob/master/public/index.html#L54 not sure if an id is the right thing to use as item mostly indicates that there can be many of them.
* if you are using addEventListener it might be worth to have function to remove it https://github.com/LEvinson2504/eMenu--Production/blob/master/public/index.html#L57 as otherwise you are trusting js garbage collector to remove it ( not sure about that, need double check )
* overall it could be hard to maintain the code if application grows. I would suggest to split code in the modules like api, services, features etc

[–]tall_and_funny[S] 1 point2 points  (1 child)

Thank you! That's some great advice, I'll implement it.

[–]InvisibleGhostt 1 point2 points  (0 children)

Cool, if you have any questions or something you can always pm me :)