Skip to content

README mentions wrong port, and wrong expected default GET response #12877

@Stokestack

Description

@Stokestack
Description

I generated server-side code for NodeJS/Express and ran it, and was able to access api-docs. But the README dump after code generation tells the user that the server runs on port 3000, when in fact it runs on 8080 by default.

After saying "the server will run on port 3000," it repeats this port number here:

### View and test the API
(Assuming no changes were made to config.js)

1. API documentation, and to check the available endpoints:
http://localhost:3000/api-docs/.

I didn't change config.js, and yet when you run the server, it says: "Listening on port 8080." And this is indeed where it is listening.

openapi-generator version

6.0.1

OpenAPI declaration file content or url

I don't think this is dependent on the API-definition file.

Generation Details

Generator command I used:
openapi-generator-cli generate -i deviceAPI.json -g nodejs-express-server -o ~/node_server

Steps to reproduce

Generate a NodeJS/Express server from your API definition and look at the readme output.

Suggest a fix

Change the port in the README to 8080.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions