search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

1 answers
Q&A javascript - When referencing the table model defined in model, model is undefined.

0

I use the node express framework and the sequelize model.
There is no problem with the API being referenced in the controller layer, but when the model layer is defined, the printed model is empty

var Models = require('../config/sequelize')

As shown in the figure, the model layer is all table models. I want to add a hook in it. When no data is added to the station table, another table automatically adds a piece of data, similar to the trigger of mysql. However, when running the code, the model It’s always empty,
I’ve been struggling for several days, please help me, thank you

Your Answer
submit

1 answers
0

Sequelize Is module.exports exposed

2017-07-04 13:47:15

submit

Popular tool

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use