-
Notifications
You must be signed in to change notification settings - Fork 29
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
Express template #176
Express template #176
Conversation
🦋 Changeset is good to goLatest commit: 4dc961e We got this. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a promising start. I think it would be good to provide a bit more structure in the stencil so those who are starting from scratch have something to go off of.
}, | ||
"skuba": { | ||
"entryPoint": "src/main.ts", | ||
"template": "koa-rest-api", | ||
"type": "application", | ||
"version": "3.7.7" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This stuff is generated
}, | |
"skuba": { | |
"entryPoint": "src/main.ts", | |
"template": "koa-rest-api", | |
"type": "application", | |
"version": "3.7.7" | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, if i get you correctly. Should I remove this line ? 😕
How about the entry point ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole skuba
section can be removed, you'll notice that none of the other templates have it. It's generated dynamically in part from the skuba.template.js
, e.g.
I believe that specified entry point is mismatched with your template. Is there a reason to deviate and choose main.ts
when every other template uses app.ts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted with thanks. Will make the changes.
main.ts
is usually used in the nestjs framework, but I think app.ts
will do.
Co-authored-by: Ryan Ling <ryan@outlook.com.au>
Co-authored-by: Ryan Ling <ryan@outlook.com.au>
template/express-rest-api/Dockerfile
Outdated
ENV PORT ${PORT} | ||
EXPOSE ${PORT} | ||
|
||
CMD node lib/main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this what you run in production? Granted I wouldn't expect these frameworks to properly crash often, but spinning up a new ECS task would be slower than having a clustering implementation spawn another process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we are running our some of our project like this in production. Do you recommend running node with pm2-runtime ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's an open question for us to resolve around when multiple processes make sense with constrained compute in Fargate. I'm happy to leave this for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @72636c , we did use pm2 for one of our services in the past, but stopped. Main reason: we don't expect crashes to be a part of a normal application lifecycle. It also was causing us some issues, when app was keep crashing but we thought it was running (but probably because of the way, how we configured our monitors in DataDog).
I think there's an open question for us to resolve around when multiple processes make sense with constrained compute in Fargate.
I see this question is more like an advanced topic, which requires to have proper circumstances. We don't have it yet. So I would agree with you that we might leave it out of scope for now.
p.s. on a personal note I would like to hear when and how you use pm2 to overcome "constrained compute in Fargate".
Co-authored-by: Ryan Ling <ryan@outlook.com.au>
Co-authored-by: Ryan Ling <ryan@outlook.com.au>
…o express-template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 thanks for this!
Introducing a simple
Hello World
expressjs template for skuba.