how to use environment variables in nx monorepo libs, exporting to multiple Nextjs apps

Advertisements I’d like to load some environment variables into functions within my libs, and then be able to re-export this to several different Nextjs applications. i.e. Within libs/api export const getDatabaseConnection = () => { const host = process.env.DB_HOST const username = process.env.DB_USERNAME … return newDatabaseConnection } Within apps/myNextJSApp: import { getDatabaseConnection } from ‘@myProject/api’… Read More how to use environment variables in nx monorepo libs, exporting to multiple Nextjs apps