skip to Main Content

Javascript – Didn't get json data in express.js

index.js file import dotenv from "dotenv"; import connectDB from './db/index.js' ; import { app } from "./app.js"; dotenv.config({ path:'./env' }) connectDB() .then(()=>{ app.listen(process.env.PORT || 8000,(req, res)=>{ console.log(`server is running at port at ${process.env.PORT}`) }) }) .catch((err)=>{ console.log(err) }) app.js file…

VIEW QUESTION
Back To Top
Search