
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
hunt-sequilize
Advanced tools
Use Sequilize.js models in Hunt.js framework of v.0.2.0 and higher
var hunt = require('hunt'),
huntSequilize = require('hunt-sequilize'),
Hunt = hunt({
'sequelizeUrl': 'sqlite://localhost/' //create database in memory
});
huntSequilize(Hunt); //this it it
Hunt.extendModel('Planet', function (core) {
return core.sequelize.define('Planet', {
name: core.Sequelize.STRING
});
});
Hunt.on('start', function () {
Hunt.sequelize.sync().success(function () {
Hunt.model.Planet.create({
name: 'Earth'
}).success(function (planet) {
console.log('Planet "'+planet.name+'" is recorded to database');
Hunt.model.Planet
.find({ where: {name: 'Earth'} })
.success(function (planetFound) {
console.log('Planet "'+planetFound.name+'" is found to database');
Hunt.stop();
});
});
});
});
Hunt.startBackGround();
Only one configuration parameter is accepted - sequelizeUrl
. It have to be passed as config
object parameter.
It can be populated from environmental values of DATABASE_URL
(usually used by Heroku PostgreSQL),
CLEARDB_DATABASE_URL
, or SQL_URL
. It can have the following syntax:
var Hunt = hunt({
'sequelizeUrl': 'sqlite://localhost/' //create database in memory
});
var Hunt = hunt({
'sequelizeUrl': 'sqlite://localhost/path/to/database.db' //create database in a local file
});
var Hunt = hunt({
'sequelizeUrl': 'mysql://myLogin:myPassword@localhost:3306/myDatabaseName'
});
var Hunt = hunt({
'sequelizeUrl': 'postgres://myLogin:myPassword@localhost:5432/myDatabaseName'
});
FAQs
Use Sequilize.js models in Hunt.js application
The npm package hunt-sequilize receives a total of 2 weekly downloads. As such, hunt-sequilize popularity was classified as not popular.
We found that hunt-sequilize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.