What do you want to save?
Add Code snippet
New code examples
-
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 -
Javascript 2021-10-09 18:01:05
cloudinary error: [Error: ENOENT: no such file or directory
const express = require("express"); const bodyParser = require('body-parser'); const router = express.Router(); const path = require('path'); require('dotenv').config(); require('../../client/src/components/handlers/cloudinary'); const cloudina... Add solution -
Javascript 2021-09-30 09:45:05
how to manage logging using winston for production and development in node js "github"
const winston = require('winston'); const { createLogger, format, transports } = require('winston'); const dotenv = require('dotenv'); dotenv.config(); var logger = createLogger({ level: 'info', format: format.combine( format.timestamp({... Add solution -
Javascript 2021-09-14 22:34:01
require method-override
'use strict'; // Application dependencies const express = require('express'); const cors = require('cors'); const superagent = require('superagent'); const pg = require('pg'); const methodOverride = require('method-override'); // Application setup requir... Add solution -
Other 2021-09-09 11:07:02
Error: Cannot find module 'dotenv'
$ 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