Questions tagged [nodejs-express-server]

21 questions
3
votes
0 answers

Logging http request without authorization/token header express-winston on openapi-generator-cli server stub

I am trying to use express-winston to log on my nodejs-express-server app. This app is an openapi API server stub created from openapi-generator-cli. Was referring to this post about excluding params while logging the request. My intention here is…
3
votes
1 answer

Writing Node business logic behind openapi-generator-cli nodejs-express-server

Currently we are doing the following: Using an openapitools.json that looks like the following: { "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { "version": "5.1.1", …
Evan
  • 5,975
  • 8
  • 34
  • 63
2
votes
1 answer

How do render swagger.json content in reactjs

I am trying to create a document portal for my API's with Express and reactJs. Basically, I get the JSON content(swagger.json) from the Express server and I want to pass it to swagger UI on the client to display In the docs…
user2570135
  • 2,669
  • 6
  • 50
  • 80
1
vote
0 answers

How to make a ssl certificates for my nodeJs Express WEB api thus run on my local network?

I am trying to build a web api with hosted on my local network but the thing is my frontend website was deployed on web but i get this error on axios AxiosError: Network Error on my console it says this XMLHttpRequest endpoint…
1
vote
2 answers

Send data from server to client. NodeJS, Express

I am trying to send data from my express server to the client side. I have used app.post and app.get, the problem i'm having is that with either of those, the request must come from the client side. I need to send to push the data from the server…
1
vote
0 answers

creating a mock JWT token for testing

I'm trying to create a test that will test the following branch. if (req.body.sessionToken) { let sessionToken = req.body.sessionToken; let tokenData = jwt.verify(sessionToken,config.secretSessionKey); sessionID = tokenData.sessionID; } I…
1
vote
0 answers

In Angular How to Run a Loop that hit Back-End one by one

From Angular When I send some parameter to my Node.js Backend that generate a big array and got some error or timeout issue. I wanted to send a limited parameter to back end by Loop. So how to create this Loop that will hit back end -> then get…
0
votes
0 answers

CSS stylesheet causing syntax errors in node.js application

I'm trying to load a css file into my node.js application however it causes syntax errors in my application. here is my css file called "style.css" under an assets folder .like__btn { padding: 10px 15px; background: #0080ff; font-size:…
0
votes
0 answers

Express server issues with representing a second properties panel in bpmn-js extension

I have an issue when it comes to extending the bpmn-js-properties-panel-async-extension provided at this link below: extension I have essentially repeated the code for an extension I want to make. For some reason the new drop down bar doesn't want…
0
votes
1 answer

No response from server when submitting form data from front end

While building a MERN project from EdRoh on youtube, i got this problem where on the register page when i submit the form data it should redirect to login page and the data should get stored on mongodb database. When i checked it with Postman it is…
0
votes
0 answers

Angular Universal NodeJS production url works, localhost api gives error "Http failure response"

I have an Angular 14 application with Universal. The app is running server side on nodejs. My app is fetching api data to fill the html page since I need that for SEO purposes. When my app is running locally with npm run dev:ssr and my api urls are…
0
votes
0 answers

Error while requesting to the server from another device in the same network by Axios to express server

while requesting data from server using Axios.post("http://localhost:5000/api/admin/getdblogo") from another device in same network , it gives the follwing error:- Google chrome error xhr.js:220 POST…
0
votes
2 answers

SyntaxError: Unexpected token < in JSON at position 0 API GET

I'm trying to get a json file using API (node.js express). When I run the below code, I've got the error (SyntaxError: Unexpected token < in JSON at position 0). I have no clue for the error. The json file returns this. [ RowDataPacket { id: 1,…
coala
  • 11
  • 5
0
votes
1 answer

Loading multiple express endpoint files to main app

I'm trying to require/run all the files in a folder but having issues: Inside Endpoints: index.js; const { Router } = require("express"); const router = Router(); router.get("/", async (req, res) => { …
Johnty
  • 246
  • 1
  • 2
  • 18
0
votes
2 answers

how to fetch data from third party api using EXPRESS and AXIOS?

guys..... so I want to fetch data from a third party api but the problem is the data is fetched but its not displaying in the console..... means when ever I run my server the data gets displayed on the terminal but its not getting displayed in the…
user11464857
1
2