Generate a New Application
For this full-stack application, we'll be using the last of the SDG
sdg-react. This app includes:
The sdg-react template generates a full React application in the directory
ClientApp and ensures connectivity to the C# backend application found in the
rest of the directories.
From your command line in the directory where you've stored your other assignments, execute the following command
dotnet new sdg-react-no-client-app -o TacoTuesday
degit YOUR-GITHUB-ACCOUNT-HERE/react-project-template ClientApp
git add .
git commit -m "Initial ClientApp"
You'll need two terminal/PowerShell to run the app. In the first window:
dotnet watch run
and then in the second:
(You may need to
cd again to your project if the new terminal/PowerShell
starts in your "home" folder)
cd ClientAppnpm start
Open your browser and visit
http://localhost:5000, this is the URL we will use
to view our full stack web application.
You may see a page that says:
You do not have a valid JWT_KEY.
To resolve this warning, follow the instructions on the screen, restart
dotnet watch run and reload your browser at
http://localhost:5000 -- You
should see your default front end template's content.