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

fix(command:init): dev command for Next.Js projects #555

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

glaucia86
Copy link
Contributor

Pull Request related with #553

Results

I made some screenshots to show that it is working now. To reproduce, follow the steps below:

1 - Create any Next.Js project. Eg

npx create-next-app --example hello-world hello-world-app

2 - Now run the command

swa init

After to execute the command it will generate a file swa-cli.config with the configuration

{
  "$schema": "https://aka.ms/azure/static-web-apps-cli/schema",
  "configurations": {
    "hello-world-app-glau": {
      "appLocation": ".",
      "outputLocation": ".next",
      "appBuildCommand": "npm run build",
      "run": "npm run dev",
      "appDevserverUrl": "http://localhost:3000"
    }
  }
}

Screen Shot 09-09-22 at 07 23 PM 002

4 - Now execute the command

swa start

Screen Shot 09-09-22 at 07 23 PM

And open a browser on port localhost:4280. If you see the message: 'Hello World' it is because it's working perfectly.

Screen Shot 09-09-22 at 07 23 PM 001

@sgollapudi77 sgollapudi77 merged commit ea62a4f into Azure:main Sep 12, 2022
@sgollapudi77
Copy link
Contributor

@all-contributors add @glaucia86 code

@allcontributors
Copy link
Contributor

@sgollapudi77

I've put up a pull request to add @glaucia86! 🎉

@sgollapudi77
Copy link
Contributor

Closes #553

@glaucia86
Copy link
Contributor Author

Thanks a lot, @sgollapudi77 @manekinekko and @Reshmi-Sriram

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