skip to Main Content

Javascript – unable to retrieve data using postgres and nodeJS

Here is how i've set the following files: index.js const express = require('express') const app = express() const port = 8000 const expense_model = require('./expense_model') app.use(express.json()); app.use(function (req, res, next) { res.setHeader('Access-Control-Allow-Origin', 'http://localhost:8000'); res.setHeader('Access-Control-Allow-Methods', 'GET,POST,PUT,DELETE,OPTIONS'); res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Access-Control-Allow-Headers'); next(); });…

VIEW QUESTION

Javascript – Reference error: API_URL_KEY is not defined

hardhat.config.js require("@nomicfoundation/hardhat-toolbox"); /** @type import('hardhat/config').HardhatUserConfig */ module.exports = { solidity: "0.8.18", }; /* @type import('hardhat/config').HardhatUserConfig*/ require("@nomiclabs/hardhat-ethers"); require('dotenv').config(); const { API_URL_KEY, PRIVATE_KEY } = process.env; module.exports = { solidity: "0.8.17", defaultNetwork: "goerli", networks: { hardhat: {}, goerli: { url: API_URL_KEY, account:…

VIEW QUESTION
Back To Top
Search