Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start does not start the generated application. #237

Closed
freakfan15 opened this issue Nov 4, 2023 · 3 comments
Closed

npm start does not start the generated application. #237

freakfan15 opened this issue Nov 4, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@freakfan15
Copy link

Describe the bug

  • I was going through the official docs to generate code here.
  • npm install and npm start doesn't start the genrerated server inside output dir.

How to Reproduce

  • used this command asyncapi generate fromTemplate asyncapi.yaml @asyncapi/nodejs-template -o output -p server=mosquitto to generate the application
  • used the asyncapi.yaml file from the streetlight eg in the docs here
  • when I do npm start, the server does not start as mentioned in the docs.
    image

Expected behavior

  • when i went in the output/src/api/index.js file i didn't see the init function being called anywhere. So, I added
    client.init() and it started as expected.

image
image

  • I see the client being exported, but according to the docs, just npm start should start the app. That is why raising the issue. Thanks.
@freakfan15 freakfan15 added the bug Something isn't working label Nov 4, 2023
Copy link

github-actions bot commented Nov 4, 2023

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@derberg
Copy link
Member

derberg commented Feb 14, 2024

@freakfan15 hey, you link to https://www.asyncapi.com/docs/tutorials/create-asyncapi-document but it is a document that only explains how to create AsyncAPI document and had nothing to do with this template

Nevertheless I see we have a bug in docs, and also the npm start command is in fact not updated because this template no longer generate an app but a library and you should follow https://github.com/asyncapi/nodejs-template?tab=readme-ov-file#adding-custom-code--handlers to actually test how it works

@freakfan15 would you like to contribute needed changes?

@derberg
Copy link
Member

derberg commented May 7, 2024

closing, it is old docs related issue, v3 has different starting commadn asyncapi new glee --name=tutorial --template tutorial

@derberg derberg closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants