You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Streamlet is a "Flat File Database" that takes advantage of JS Streams
An example program implementing streamlet with an Express application might look similar to this:
constapp=require('express')()conststreamlet=require('streamlet')constpath=require('path')constconfig={port: "3000"dbPath: path.join(__dirname,"db.sl")}letdb=newstreamlet(config.dbPath)app.listen(config.port,async()=>{awaitdb.init()// Rest of your Application})
Ensure that before any operations on the database are done that await db.init() this will open an append stream on the file noted in config.dbPath