What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-03 00:10:02
discord.js help
const Discord = require('discord.js') require('dotenv').config(); const bot = new Discord.Client(); const token = 'ODE0NzA1NzQzOTczMzE4NzA2.YDhv2Q.5WtTxRrG-tFzqPUCo4HY30wqLcY'; bot.commands = new Discord.Collection(); bot.events = new Discord.Collection(... Add solution -
Javascript 2022-01-29 10:16:32
default express structure
const express = require('express') const cors = require('cors') const bodyParser = require('body-parser') require('dotenv').config() const ObjectId = require("mongodb").ObjectId; const app = express() app.use(cors()) app.use(express.json()) con... Add solution -
Javascript 2022-01-28 20:55:32
npm node env
$ npm install dotenv //-------------------- on file .env //-------------------- DB_HOST=localhost DB_USER=root DB_PASS=s1mpl3 DB_NAME=banco_de_dados DB_PORT=3306 //-------------------- import the config from .env file //-------------------- require... Add solution -
Shell/Bash 2022-01-22 04:45:27
how to use dotenv in javascript
$ npm install dotenv //-------------------- on file .env //-------------------- DB_HOST=localhost DB_USER=root DB_PASS=s1mpl3 DB_NAME=banco_de_dados DB_PORT=3306 //-------------------- import the config from .env file //-------------------- require... Add solution -
Other 2021-11-21 20:19:29
npm twilio
npm i --save twillio dotenv // login into twillio account // create app.js file require('dotenv').config(); var accountSid = process.env.TWILIO_ACCOUNT_SID; // Your Account SID from www.twilio.com/console console.log("======> :: accountSid"... Add solution -
Javascript 2021-11-17 14:37:20
require database
const express = require('express'); const cors = require('cors'); const superagent = require('superagent'); const pg = require('pg'); require('dotenv').config(); const app = express(); app.use(cors()); app.use(express.static('public')); app.set('view engi... Add solution -
Other 2021-11-09 02:30:08
how to import token from .env file discord bot
require('dotenv').config(); // process.env.NODE_ENV allows you to get the environment the node process is in let ver = process.env.NODE_ENV; client.on('ready', () => { if (ver === 'production') { client.user.setActivity('An Idiot\'s Guide', { ... Add solution
Best helpers
Blank
+5
Grin
+5
Hwsolutions
+5
Charlemagne
+5
SYJ
+5
A. Pelicker
+5
KMC
+5
Jonjie
+5
37Bons
+5
Highlightman
+5
Paul Knight
+5
Karl
+5
WYSIWYG
+5
Required
+5
Saylestyler
+5
Deverejones
+5
Zkanoca
+5
Frank Jaeger
+5