/
kopython
/
_hyperscript-node
Обзор
Документация
Войти
/
kopython
/
_hyperscript-node
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
lib/db._hs
17 строк
662 B
Drew McDonald
* real init commit
29 ноя 2022, 02:51
29 ноя 2022, 02:51
43e7026
Код
Авторство
О чём код?
require '\sequelize' def new(process) set the dbInfo to {} set the dbInfo's db to process.env.DB_USE set the dbInfo's user to process.env.DB_USER set the dbInfo's password to process.env.DB_PASSWORD set the dbInfo's port to process.env.DB_PORT set the dbInfo's dialect to process.env.BD_DIALECT -- This has to be in js because I haven't extend _hyperscript -- because I need to make a new instance of the Sequelize class js (sequelize, dbInfo) return new sequelize.Sequelize(dbInfo.db, dbInfo.user, dbInfo.password, { dialect: dbInfo.dialect, port: dbInfo.port }); end then set db to it return db end