herbsjs / herbs-cli

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

fix env port to deploy api #168

Closed tadvortx closed 1 year ago

tadvortx commented 1 year ago

Fixes https://github.com/herbsjs/herbs-cli/issues/167

Describe the bug

When I try to deploy the API GraphQL or Rest, We have a problem because the file api.js dosent have the process.env.PORT to get the correct port from the server

To reproduce

Try to deploy the project without docker to reproduce this error, the server will get timeout because the port that app listen is 3000

codecov[bot] commented 1 year ago

Codecov Report

Merging #168 (9458969) into main (fbc1265) will decrease coverage by 19.91%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main     #168       +/-   ##
===========================================
- Coverage   87.20%   67.28%   -19.92%     
===========================================
  Files          25       27        +2     
  Lines         422      593      +171     
===========================================
+ Hits          368      399       +31     
- Misses         54      194      +140     
Impacted Files Coverage Δ
src/generators/src/packagejson.js 100.00% <ø> (ø)
src/generators/src/infra/api/graphql.js 100.00% <100.00%> (ø)
src/generators/src/infra/api/rest.js 100.00% <100.00%> (ø)
src/generators/src/infra/api/server.js 100.00% <100.00%> (ø)
src/commands/update.js 100.00% <0.00%> (ø)
src/commands/assist.js 5.00% <0.00%> (ø)
src/helpers/toolbox.js 65.00% <0.00%> (ø)
src/commands/new.js 83.67% <0.00%> (+1.85%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

herbsjs-robot commented 1 year ago

:tada: This PR is included in version 2.18.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: