Node.js - require empty path

后端 未结 2 1118
梦毁少年i
梦毁少年i 2020-12-11 02:30

I came across this file on github, which does this:

var migrate = require(\'../\')

What does that mean? When I tried the same, I get:

2条回答
  •  -上瘾入骨i
    2020-12-11 02:58

    It requires the file index.js of the parent folder, which is this one: https://github.com/visionmedia/node-migrate/blob/master/index.js

提交回复
热议问题