Node require absolute path

后端 未结 5 1531
小蘑菇
小蘑菇 2020-12-30 23:31

I have a directory that looks like this:

-- app/
   |- models/
      |- user.js
   |- config.json

I want my user.js file to re

5条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-30 23:33

    I couldn't find any better solution than to write own module

提交回复
热议问题