zap-db
Mongo Seeding
zap-db | Mongo Seeding | |
---|---|---|
4 | 1 | |
104 | 549 | |
0.0% | - | |
0.0 | 5.7 | |
almost 2 years ago | 5 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
zap-db
- zap-db: we made a JSON based database written in typescript and running on node, especially suited to slack/discord bots and works great as a replacement to json blobs :)
-
Releasing Zap-Db
An easy to use JSON database written with ease of setup and memory management of slack bots in mind.
https://github.com/sdslabs/zap-db
-
zap-db: we made a JSON based database, especially suited to slack/discord bots and works great as a replacement to json blobs :)
You should consider avoiding sync FS operations however, such as in https://github.com/sdslabs/zap-db/blob/master/src/lib/session.ts . This is because of how the event loop in Node.js works: using async operations allows Node.js to work on another request while it waits for the operating system to read the file; if you use sync operations, however, it blocks the entire event loop so only one request at a time can be processed.
Mongo Seeding
-
Create Docker container with mongo and seed data.
I usually use mongo seeding (https://github.com/pkosiec/mongo-seeding) instead of mongoimport. I find the cli much more flexible.
What are some alternatives?
BotD - Bot detection library that runs in the browser. Detects automation tools and frameworks. No server required, runs 100% on the client. MIT license, no usage restrictions.
Lowdb - Simple and fast JSON database
typegoose - Typegoose - Define Mongoose models using TypeScript classes.
loki-gm - Basic fun little project to make a GroupMe bot called Loki
NeDB - The JavaScript Database, for Node.js, nw.js, electron and the browser
@databases - TypeScript clients for databases that prevent SQL Injection
pg-mem - An in memory postgres DB instance for your unit tests
nestjs-boilerplate - NestJS boilerplate. Auth, TypeORM, Mongoose, Postgres, MongoDB, Mailing, I18N, Docker.
database-js - Common Database Interface for Node
express-typescript-boilerplate - A delightful way to building a RESTful API with NodeJs & TypeScript by @w3tecch
Finale - Create flexible REST endpoints and controllers from Sequelize models in your Express app