node-pg-migrate
logpaste
node-pg-migrate | logpaste | |
---|---|---|
4 | 8 | |
1,284 | 313 | |
1.1% | - | |
9.5 | 7.7 | |
6 days ago | 7 months ago | |
TypeScript | Go | |
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.
node-pg-migrate
-
Fully featured Repository Pattern with Typescript and native PostgreSQL driver
Why PG? For the clarity of the article to a large circle of developers, the entire explanation will be built by PostgreSQL and PG package. And in a real project, the database schema will change over time, and in order to be able to perform migrations, we will use Node PG migrate.
-
New to PostgreSQL - Best way to use it?
b) How you will manage schema migrations: every time you change tables, columns, foreign keys, every time you create or modify stored procedures, and so on, you need to do this through a migration. Here I'm at loss to recommend anything specific, but if you went with Prisma, I would read their docs and use whatever they are recommending you (if they actually recommend something). If you want something more neutral but still in the node ecosystem, node-pg-migrate might be the winner here? I'm not sure.
-
Postgres: What is the development process?
You’ll probably want something like this too: https://github.com/salsita/node-pg-migrate
-
The Architecture of a One-Man SaaS
You can use any normal DB migration tool. For k8s, I put the app's readiness probe to false, run the migrations and then toggle the probe back to true.
Here are some migration libraries:
Go - https://github.com/golang-migrate/migrate
Node - https://github.com/salsita/node-pg-migrate
logpaste
-
Migrating from SQLite to PostgreSQL
FWIW, I've used Litestream on Google Cloud Run and never run into issues, but I haven't pushed it much:
https://github.com/mtlynch/logpaste/blob/master/docs/deploym...
-
PicoShare: A minimalist, easy-to-host service for sharing images and other files
Currently, no. I've implemented that functionality recently in my other tool, LogPaste, so it shouldn't be too hard to reproduce here.
- Log Paste
-
How Litestream Eliminated My Database Server for $0.03/month
My tool is called LogPaste. It allows users to generate shareable URLs for text files. I use it in my open-source KVM over IP device so that users can easily share diagnostic logs with me.
-
LogPaste: A self-hostable pastebin that replicates data to any S3 provider
I designed it with self-hosting in mind, so there are instructions for hosting it under Docker, as well as with several free cloud hosting providers. You can even host the data storage part yourself if you use a solution like Minio.
-
The Architecture of a One-Man SaaS
I still use GCP, but I avoid locking myself into their proprietary infrastructure when I'm writing new stuff. I feel like Google is far too cavalier about deprecating services and forcing their customers to do migration work.
It is hard to replace GCP's managed datastores because I really don't want to maintain my own database server (even if it's a managed service that someone else upgrades for me). So I've stuck to Google Cloud Datastore / Firestore, but I've been experimenting a lot with Litestream[0], and I think that might be my go-to choice in the future instead of proprietary managed datastores.
Litestream continuously streams data from a SQLite database to an S3 backend. It means that you can design your app to use SQLite and then sync the database to any S3 provider. I designed a simple pastebin clone on top of Litestream, and I use it in production for my open source KVM over IP. It's worked great so far, though I'm admittedly putting a pretty gentle workload on it (a handful of requests per day).
[0] https://litestream.io/
[1] https://github.com/mtlynch/logpaste
What are some alternatives?
sql-lint - An SQL linter
tinypilot - Use your Raspberry Pi as a browser-based KVM.
graphjin - GraphJin - Build NodeJS / GO APIs in 5 minutes not weeks
litestream - Streaming replication for SQLite.
prawn-stack - A pageview counter using the AWS free tier, Postgres, Node and React
s6-overlay - s6 overlay for containers (includes execline, s6-linux-utils & a custom init)
flan - A tasty tool that lets you save, load and share postgres snapshots with ease
pomf - Pomf is a simple lightweight file host with support for drop, paste, click and API uploading.
postgres-meta - A RESTful API for managing your Postgres. Fetch tables, add roles, and run queries
picoshare - A minimalist, easy-to-host service for sharing images and other files
blog - Opensource,Database,AI,Business,Minds. git clone --depth 1 https://github.com/digoal/blog
litestream-s6-example - Example repository for building a multi-process Docker container.