An unofficial, read-only Hacker News reader. Join the beta →

Minipg: PostgreSQL as a Single Executable (opens external site)

300 points by rguiscard 2 days ago | progrium.github.io | 47 comments on HN

View full thread · View on Hacker News

Comment thread (5)

  1. May I ask what moving parts you're referring to that make deploying it cumbersome? Since SQLite comes natively with Node.js (node:sqlite since Node.js v22.5.0) things got a lot easier. Before that the npm packages relying on native builds were a bit annoying for me as well.
    Replies (1)
    1. I haven't worked with it lately since the database is not a critical part of my system. The problems were basically caused because SQLite requires non-JS libraries and they need to be found in the right place, and compiled and packaged into Vercel-PKG exe, and I got obscure error-messsages.

      Happy to hear things are getting smoother with Node.js SQLite, but then I have the other problem that Vercel-PKG support stopped at a specific Node.js level, so I wouldn't be able to use the native Node.js SQLite anyway I assume .

      Now lately I discovered that there is an open-source fork of Vercel-PKG which supports later Node.js versions: npmjs.com/package/@yao-pkg/pkg?activeTab=readme&__cf_chl_tk=eDzgWvIL2OkIxMCGlCoLW6Mi2t2ciRkE6HMYKl46MnY-1795671127-1.0.1.1-fY.UrK80ucEtTwp1j_XEPi4eI5iwficmiVkl4qjE1HY .

      Once I get my build-process ported to that or something similar I will certainly revisit the database question again for my project.

      But then whether the Node.js native SQLite runs after compiling it into the Vercel-PKG exe lookalike I don't know (yet).

      Replies (2)
      1. Ever thought about dropping vercel and using a proper deployment environment?
        Replies (1)
        1. Try reading the other word appended to Vercel
      2. Node also has its own single executable thing now: https://nodejs.org/api/single-executable-applications.html