Registry / database / semini

semini

JSON →
library1.5.125jsnpmunverified

Semini (v1.5.125) is a Node.js package for database and website initialization using MongoDB, Express.js, and Handlebars.js. It provides tools for setting up database schemas, seeding data, and configuring SEO-friendly site structures. Compared to alternatives, it offers a bundled initialization workflow with minimal configuration. Released infrequently, this version is stable but lacks detailed documentation.

npm install semini
INSTALL
IMPORT
SIG · SEMINI
S
semini
databasejavascriptv1.5.125
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import semini from 'semini'
const semini = require('semini')
Package is ESM-only since v1.0.0.
init
import { init } from 'semini'
const init = require('semini').init
Named export for database initialization.
types
import type { Config } from 'semini'
import { Config } from 'semini' (value import)
Use 'import type' for TypeScript types to avoid runtime errors.

Shows how to import and use the init function with MongoDB connection string from environment variable.

import { init } from 'semini'; const config = { database: { uri: process.env.MONGO_URI ?? 'mongodb://localhost:27017/myapp', name: 'myapp' }, site: { title: 'My Site', description: 'A site initialized with semini' } }; init(config) .then(() => console.log('Database and site initialized successfully')) .catch(err => console.error('Initialization failed:', err));
Debug
Known issues
breakingIn v1.0.0, the package switched from CommonJS to ESM. require() will fail.
fix
Use import syntax or downgrade to v0.x.
affects: >=1.0.0
gotchaThe init function mutates the global Express app object if not isolated.
fix
Pass a fresh Express instance via config or use a scoped initialization.
affects: all
deprecatedThe default import semini() is deprecated since v1.5.0.
fix
Use named import { init } instead.
affects: >=1.5.0
gotchaHandlebars templates must be placed in a 'views' directory by default, else initialization fails silently.
fix
Set 'site.viewsDir' in config to the correct path.
affects: all
breakingMongoDB driver v4+ is required as of v1.4.0; v3 is not supported.
fix
Update mongodb dependency to v4 or later.
affects: >=1.4.0
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
Package is ESM-only, but project is not configured for ESM.
fix
Add "type": "module" to package.json or use .mjs extension.
TypeError: init is not a function
Using default import for named export.
fix
Use import { init } from 'semini' instead of import semini from 'semini'.
Error: MongoDB connection error: MongoError: bad auth Authentication failed.
Missing or incorrect database credentials in config.
fix
Check MONGO_URI env var or config.database.uri includes username and password.
Error: Cannot find module 'handlebars'
Handlebars peer dependency not installed.
fix
Run npm install handlebars.
Upgrade
Version history
1.5.125latest on npm
Audit
Dependencies
expressrequiredrequired for Express.js integration
handlebarsrequiredrequired for Handlebars.js templating
mongodbrequiredrequired for MongoDB database operations
Agent activity
8 hits · last 30 days
node
6
Meta
1
Resources
semini — npm install semini · libregistry