Local host 3001 not working . web3 DEX

Hey this is my index.js code . after updating the code with const [query]… I am unable to fetch the local host . and also could’nt terminate the API Call .(tried ctrl+c) . but it takes me back to this.(PS C:\Users\syeds\OneDrive\Desktop\token\dexStarter\dexBack> ).

const express = require(“express”);

const Moralis = require(“moralis”).default;

const app = express();

const cors = require(“cors”);

require(“dotenv”).config();

const port = 3001;

app.use(cors());

app.use(express.json());

app.get("/tokenPrice", async (req, res) => {

const {query} =req;

const responseOne=await Moralis.EvmApi.token.getTokenPrice({

address:query.addressOne

})

const responseTwo=await Moralis.EvmApi.token.getTokenPrice({

address:query.addressTwo

})

console.log(responseOne.raw);

console.log(responseTwo.raw);

return res.status(200).json({});

});

Moralis.start({

apiKey: process.env.MORALIS_KEY,

}).then(() => {

app.listen(port, () => {

console.log(`Listening for API Calls`);

});

});

Package.json

{

“name”: “dexback”,

“version”: “1.0.0”,

“description”: “”,

“main”: “index.js”,

“scripts”: {

"test": "echo \"Error: no test specified\" && exit 1"

},

“keywords”: [],

“author”: “”,

“license”: “ISC”,

“dependencies”: {

"bigint-buffer": "^1.1.5",

"cors": "^2.8.5",

"dotenv": "^16.0.3",

"express": "^4.18.2",

"moralis": "^2.22.4"

}

}

Hi @khan

Your code looks correct. How did you start the server?