D
D
dicem2022-02-07 18:18:30
Node.js
dicem, 2022-02-07 18:18:30

How to access .env in cli tool?

Bottom line: Making a CLI tool for generating components for Vue, ran into a bunch of path issues when it comes to running the command in other directories (not the app itself), plus ran into my CLI not seeing the .env file in the end , connect super standard

import dotenv from 'dotenv'

dotenv.config()


I didn’t understand anything from the documentation, in terms of how to configure it for my purposes, etc. T_T

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question