Skip to content

v1.3.0

Latest
Compare
Choose a tag to compare
@AzouKr AzouKr released this 04 Oct 18:58
· 22 commits to main since this release

SqliteGuiNode Middleware for Express.js

New Feature: Use SqliteGuiNodeMiddleware as Express.js Middleware

This release introduces a feature allowing SqliteGuiNodeMiddleware to be used directly as middleware in an Express.js application.

  • The SqliteGuiNodeMiddleware allows you to manage your SQLite database within the same port as your Express.js app.
  • This integration enables easier interaction with your database without requiring a separate interface or additional configuration.

Installation

Make sure you have installed the sqlite-gui-node package:

npm install sqlite-gui-node

How to Use

To integrate the middleware into your Express.js server:

  1. Import necessary packages:
  2. ImportSqliteGuiNodeMiddleware from sqlite-gui-node.
  3. Pass your Express app and SQLite database to the middleware.

Example:

// Import necessary packages
const express = require("express");
const sqlite3 = require("sqlite3").verbose();
const { SqliteGuiNodeMiddleware } = require("sqlite-gui-node");

// Initialize SQLite database
const db = new sqlite3.Database("app.db");

// Initialize Express app
const app = express();

// Use SqliteGuiNodeMiddleware
app.use(SqliteGuiNodeMiddleware(app, db));

// Start the server
app.listen(4000, () => {
  console.log("Server is running on port 4000");
});

Thank you for using sqlite-gui-node. We look forward to your feedback and contributions to make this tool even better!

Links:

Contributors:

Happy coding!