Access to DB credentials at build time : using Knex.js, Next.js and Postgresql
... / Access to DB credentials ...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Access to DB credentials at build time : using Knex.js, Next.js and Postgresql

by
ALEXANDREM8
Created on 2021-10-14 09:59:06 (edited on 2024-09-04 14:23:24) in Public Cloud Databases

Hello everyone, I'm coming to you because I wanted to deploy a Next.js project on a WebPaas server, and I encounter some issues.

At the build time I need to access to database credentials in order to Next.js to generate Static Page from db information. This process is called "Collecting page data...".

I know that the PLATFORM_RELATIONSHIPS env variables is not accessible at build time, so how do I access to the db without it ?

I have tried to connect to database via an ssh:tunnels from my local pc and I was able to access to it.

It's only at build time that I encounter this issues.

It's my first ever post, so if I forgot some information, or if it is not clear, don't hesitate to tell me.

Sorry for my English.

Thank's in advance

Jimmy


Replies are currently disabled for this question.