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

Add one click launcher #106

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mike-FreeAI
Copy link

Add a new script "launch": "sst start" to the scripts section in multiple package.json files.

  • apps/docs/package.json

    • Add "launch": "sst start" to the scripts section.
  • apps/nexus/package.json

    • Add "launch": "sst start" to the scripts section.
  • apps/www/package.json

    • Add "launch": "sst start" to the scripts section.
  • package.json

    • Add "launch": "sst start" to the scripts section.

Add a new script `"launch": "sst start"` to the `scripts` section in multiple `package.json` files.

* **apps/docs/package.json**
  - Add `"launch": "sst start"` to the `scripts` section.

* **apps/nexus/package.json**
  - Add `"launch": "sst start"` to the `scripts` section.

* **apps/www/package.json**
  - Add `"launch": "sst start"` to the `scripts` section.

* **package.json**
  - Add `"launch": "sst start"` to the `scripts` section.
@wanjohiryan
Copy link
Member

Hello there,

This won't work.

  1. The command should be sst dev and should be ran at the root of the project. Meaning you should add it to the root package.json file only
  2. You have yet to hook up SST to run Qwik and the API dev server, this requires editing the respective infra/** files and add code similar to this: (mind you this functionality is experimental)
export const web = new sst.x.DevCommand("www", {
    dev: {
        command: "bun run dev",
        directory: "apps/www",
        autostart: true,
    },
    //link: []  link the database and the like
})
  1. You have to wrap the cloudflare.PagesProject so that it can be linkable to the resources similar to the dev server:
new sst.Linkable.wrap(cloudflare.PageRule, (resource) => ({
    // these properties will be available when linked
    properties: {
        arn: resource.urn
    }
}))

Does it make sense?

@@ -26,7 +26,8 @@
"preview": "qwik build preview && vite preview --open",
"serve": "wrangler pages dev ./dist --compatibility-flags=nodejs_als",
"start": "vite --open --mode ssr",
"qwik": "qwik"
Copy link
Member

Choose a reason for hiding this comment

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

This won't work... We need the qwik command. Please visit https://qwik.dev/ for more information

@@ -5,7 +5,8 @@
"description": "Nestri's core",
"scripts": {
"dev": "wrangler dev src/index.ts",
"deploy": "wrangler deploy --minify src/index.ts"
"deploy": "wrangler deploy --minify src/index.ts",
"launch": "sst start"
Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary command

@@ -26,7 +26,8 @@
"preview": "qwik build preview && vite preview --open",
"serve": "wrangler pages dev ./dist --compatibility-flags=nodejs_als",
"start": "vite --open --mode ssr",
"qwik": "qwik"
"qwik": "qwik",
"launch": "sst start"
Copy link
Member

Choose a reason for hiding this comment

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

Nope, I believe you need to edit the infra/www for this to work

@@ -5,7 +5,8 @@
"build": "turbo build",
"dev": "turbo dev",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"lint": "turbo lint"
"lint": "turbo lint",
"launch": "sst start"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe? But not quite there

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.

2 participants