Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

env in node js

First of all run this in your terminal
npm i dotenv
then on the top of your main file 
require("dotenv").config();
and then u can use your env vars like

process.env.DISCORD_JS_BOT_TOKEN
 
PREVIOUS NEXT
Tagged: #env #node #js
ADD COMMENT
Topic
Name
6+5 =