Posts by gabriel • 147 points
5 posts
-
1
votes0
answers18
viewsQ: Reactjs add values from my websocket to components
Hello I’m starting to study Act and I find myself in a doubt: good I have a page with the following structure: import React from 'react'; export default function Home(){ return ( <> <h1…
-
0
votes1
answer56
viewsQ: Class logic in javascript
I will receive a JSON containing 2 objects: Player 1 and Player 2. It would contain the following structure: player 1: playerid socketid name points jogada player 2: player 1: playerid socketid name…
-
1
votes1
answer377
viewsQ: Send jwt in header by GET
Hello I would like to know how I could send a jwt in my header to consume in my API, a route get to catch users ( need auth ) my api to catch users: app.route('/users') .all(app.auth.authenticate())…
-
0
votes1
answer94
viewsQ: About Hooks Classmethods Sequelize
I have a question in the operation of classmethod Hooks etc I have a model: const bcrypt = require('bcrypt'); module.exports = (sequelize, DataType) => { const User = sequelize.define('tb_users',…
-
2
votes1
answer672
viewsQ: Doubt Sequelize Node.js
In relation to sequelize i created a table in my pgadmin named TB_USER but I have a question when creating the model: const Sequelize = require('sequelize'); const db =…