I need help with model integration for my specific layout using Sequelize #16899
Replies: 1 comment
-
If anyone needs help with this in future then my discord is alastor7879, join the official Minecraft discord or smthn so you can DM me as my friend requests are a little flooded |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there, I am using Sequelize with node.js, Redis (unimportant), and discord.js (you'll see discord.js code primarily in /src/index.js) with the file structure:
my /src/index.js is this:
const { Sequelize } = require("sequelize");
const { RedisHandler } = require("../BypassStartup/RedisClient");
class Database extends Sequelize {
constructor(options = {}) {
const { POSTGRES_URI } = process.env;
const sequelizeOptions = {
dialect: 'postgres'
};
super(POSTGRES_URI, sequelizeOptions);
}
module.exports = { Database };``` - I need to know how to pass the next file INTO this to allow models to be used, or some other way to put my models into my object "db" (instance of class Database which extends sequelize) in /src/index.js
/src/models/sequelizer/index.js (Unfinished)
Any help would be greatly appreciated.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions