
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
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 5 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.