I
I
IvanIvanIvanIvanIvan2018-02-13 20:45:23
Node.js
IvanIvanIvanIvanIvan, 2018-02-13 20:45:23

Node js error when including module?

Windows system File
location
index.js
8vwhplDxQ7OlO7UoLuJRRw.png
file db folder one level up contains db.js file Does
WnWzMPJXROCN8HjNIOqYEg.png
not connect db on startup
tdDxD92CQuGCDzhrF4Yjhg.png
Gives error ../db

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Tsvetkov, 2018-02-13
@IvanIvanIvanIvanIvan

either do require("../db/db.js") or rename db.js to index.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question