How to pass variable from app.js to routes/index.js?

后端 未结 4 1721
没有蜡笔的小新
没有蜡笔的小新 2020-12-16 13:18

I\'m using shrinkroute https://npmjs.org/package/shrinkroute to make links in nodejs. I get error 500 ReferenceError: shrinkr is not defined

How to pass shrinkroute

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 13:32

    you should import it. add following line to the very beginning of your code

      var shrinkroute = require('shrinkroute');
    

提交回复
热议问题