Posts by Jonathan Galdino • 36 points
3 posts
-
0
votes1
answer143
viewsA: Is it correct to create two servers in the same Nodejs app with Express?
This practice is not wrong. It is ideal to have one service per port, so I would choose to create the websocket in another port, this is because the idea is to use TLS, so it would be more…
-
1
votes2
answers687
viewsA: Sequelize making incorrect select
Glad you solved, however, I noticed something different in the way of using the Sequelize Model. Generally, you just need to import the model and use it to accomplish queries, example: const…
-
1
votes2
answers662
viewsA: Model, Express and the Mongoose
I believe you do not need to load all modules if importing them only when you need to use them. Example of User model: const mongoose = require('mongoose') const UserSchema = new mongoose.Schema({…