npm start does not start the generated application.
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=mosquittoto 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.
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.
- 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.
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.
@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?
closing, it is old docs related issue, v3 has different starting commadn asyncapi new glee --name=tutorial --template tutorial