Skip to content
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: koa integration #123

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Bijit-Mondal
Copy link
Contributor

Summary of change

Added Koa to the backend framework list.

Checklist for important updates

  • Changelog has been updated
  • Changes to the version if
    • In package.json
    • In package-lock.json
    • In lib/ts/version.ts
  • Had run npm run build-pretty
  • Had installed and ran the pre-commit hook
  • If added a new recipe, I also modified types to include the new recipe in Recipe and allRecipes
  • If added a new backend, I also modified types to include the new backend in SupportedBackends and allBackends if required

@Bijit-Mondal Bijit-Mondal changed the title feat/koa integration feat: koa integration Oct 15, 2024
lib/ts/config.ts Show resolved Hide resolved
lib/ts/types.ts Outdated Show resolved Hide resolved
lib/ts/config.ts Outdated
(flags.frontend !== undefined && flags.frontend.startsWith("next")) ||
(answers.frontend !== undefined && answers.frontend.startsWith("next"))
) {
// This means that they want to use nextjs fullstack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about other types of fe like astro / remix etc?

Copy link
Contributor Author

@Bijit-Mondal Bijit-Mondal Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this checking required? I had give this checking because it was also in backendPython, but as we are checking

near line no 586

return !shouldSkipBackendQuestion(answers, flags);

will skip backend question if it is full-stack

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works functionally with that code however the code needs to be better organised so that the flow is simpler.

Essentially, the backend frameworks should be part of the backend object so that if the user selects the node option, the code picks up the nested options from that object directly instead of keeping another one called NodeJSFrameworks etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wrong problem will occur when someone will run something like
npx create-supertokens-app --appname=my-app --recipe=emailpassword --frontend=remix --backend=python it will ask for which backend framework in python , but for --frontend=next the option to choose backend framework will not come, updating..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rishabhpoddar please re-review

lib/ts/types.ts Outdated
id: "koa",
},
{
id: "express",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to have two levels of ids here. The backend should just have node, and then there should be a nodeframework thing which will have koa, express, nest. I know that python one doesnt work this way, but we need to do this correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Check if it is the structure we need?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rishabhpoddar is this the structure we wanted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants