-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: frontend js project type #135
base: main
Are you sure you want to change the base?
Conversation
I was able to see this working locally through port forward 🎉 |
|
||
USER node | ||
|
||
CMD npx http-server -p 3000 ./build |
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.
- Readiness probe fails, which is configured for port 8012 (No idea where that config is though)
- Should we allow the default port to be configured?
- Should we allow the static content folder "./build" to be configured? It could be "dist" or something else instead
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.
- it seems that the default port for a knative service is 8080, I'm trying that now
- seems like a lot of effort, actually... but it's totally doable
- same as the second point
We would need to add those as project flags, and not all of the project type we have right now would use them, so we would need to plan this a little bit.
I'd also like some feedback from @LucaLanziani
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.
OK moving back to port 8080 worked.
Suggestion: Configure env var CI=true for Dockerfile, to avoid issues with React commands that freeze the CLI in watch mode. Eg: |
@@ -0,0 +1,14 @@ | |||
<!DOCTYPE html> |
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.
Maybe we should add an actual basic react code here?
projectType = NodeProject | ||
bytes, err := os.ReadFile(path.Join(directory, "package.json")) | ||
var result map[string]any | ||
json.Unmarshal(bytes, &result) |
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.
Lack error validation
To test this PR, go through the quick start guide with any angular, react or vue project as your demo app.
initium-cli should detect the project type by reading the package.json and checking for the "angular", "react" and "vue" keywords.
Closes #138