database-js
Mongo Seeding
Our great sponsors
database-js | Mongo Seeding | |
---|---|---|
4 | 1 | |
1,158 | 548 | |
0.5% | - | |
7.6 | 6.3 | |
about 11 hours ago | 4 months ago | |
TypeScript | TypeScript | |
Apache License 2.0 | 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.
database-js
- What practices do you recommend for a startup using Next.js, fullstack with tRPC vs seperate backend with express?
-
Postgres over WebSocket
That I understand.
But of course for the user of the driver it might be fine if that is 2 or more HTTP requests. I expect that is how PlanetScale does it in their transaction implementation, https://github.com/planetscale/database-js#transactions, and I know that is how Prisma Data Proxy handles it - the transaction is identified with an ID which is returned to the Client and then included in further requests for the same transaction.
It's valid tradeoff to make to prefer a persistent connection to keep the overhead for multiple queries in a transaction as low as possible - which seems what Neon has done here.
-
Typesafe Database Queries on the Edge
The PlanetScale team recently released their database driver which lets your query your PlanetScale database using the Fetch API. This means you can use this library to query your database in edge environments which is HUGE.
-
The PlanetScale serverless driver for JavaScript
> what happens if the company goes down?
It's open-source. What's your concern now?
https://github.com/planetscale/database-js
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?
Knex - A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.
Lowdb - Simple and fast JSON database
typegoose - Typegoose - Define Mongoose models using TypeScript classes.
puresql - ES6/7 ready SQL library for node.js inspired by Clojure's yesql
NeDB - The JavaScript Database, for Node.js, nw.js, electron and the browser
@databases - TypeScript clients for databases that prevent SQL Injection
hugo-extended - ✏️ Plug-and-play Node.js wrapper for Hugo Extended, the awesomest static-site generator.
pg-mem - An in memory postgres DB instance for your unit tests
nestjs-boilerplate - NestJS boilerplate. Auth, TypeORM, Mongoose, Postgres, MongoDB, Mailing, I18N, Docker.