herbsjs / herbs-cli

Herbs CLI
https://herbsjs.org/
MIT License
29 stars 30 forks source link

The new project was generated with a server but has no graphql or rest layer #155

Open maikvortx opened 1 year ago

maikvortx commented 1 year ago

Describe the bug

I have created a new project without rest/graphql layer, but the project has been created with a server.start in index file.

To Reproduce Steps to reproduce the behavior:

  1. herbs new
  2. graphql layer: no
  3. rest layer: no

Expected behavior

Create a new project without configurations for a api.

Screenshots

image

jhomarolo commented 1 year ago

Duplicate with #141

dalssoft commented 1 year ago

@jhomarolo I don't think it is duplicated since #141 is a feature and what @maikvortx reports is a bug.

for now, I think that if user chooses "No" for REST, then it should be "Yes" as default for GraphQL, with no option to change. In other words, the project should have at least one transport layer.

in the future we could discuss what would be alternatives for it.

italojs commented 1 year ago

I don't think so, I could want to generate a console application and don't have rest either graphql layers. For me, we solve it by creating a console layer option or just creating nothing, so the developer could use the herbs2rpl on the domain layer.

maikvortx commented 1 year ago

I agree with @italojs! We can generate a project to interact with herbs2rpl.