tomit4 / todolist_DB

to do list app from terminal with nodejs and rethinkdb
0 stars 0 forks source link

poorly declared variable assignment #1

Open yvvas opened 3 years ago

yvvas commented 3 years ago

https://github.com/tomit4/todolist_DB/blob/fe6018297146cc2a5f08e4547e239bddab5b033f/rethink.js#L30

yvvas commented 3 years ago

You don't actually need to store the promise an any scope...

there's a better way to get a connected database by calling this function at the beginning of the app lifecycle

yvvas commented 3 years ago

https://github.com/tomit4/todolist_DB/blob/fe6018297146cc2a5f08e4547e239bddab5b033f/index.js#L54

You actually are already storing it here for use, but you don't use it?