This is a simple project with two pages:
- Products page
- Checkout page
Click on the cart icon after an item has been added. Refresh the page to refresh the cart.
- Visual Studio 2017
- ASP.Net Core (Version 1.0.2)
- DocumentDb Emulator (or an Azure DocumentDb account)
- Node.js (v 6.0 or higher) and npm (v3 or higher)
- TypeScript (v 2.1 or higher)
- Webpack (v2)
- If you are using the credentials from your own DocumentDB, please replace the values of Endpoint and Key in the project appsettings.json file. Otherwise, if you are using DocumentDB Emulator, these settings below are already set on the project.
"DocumentDb": {
"Endpoint": "https://localhost:8081/",
"Key": "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
"Name": "shoppingcartdemo"
}
- Download/Clone the code
- Verify that DocumentDB Emulator or your own DocumentDB instance is up and running
- Open a Console Window and navigate to MainSite
- Run "npm install"
- Run "dotnet restore"
- Run "dotnet build"
- Run "dotnet run"
- Download/Clone the code
- Open the Solution in Visual Studio 2017
- Verify that DocumentDB Emulator or your own DocumentDB instance is up and running
- From the launchSettings.json (./MainSite/Properties/launchSettings.json), copy the applicationUrl
- In the app.config.ts (./MainSite/ClientApp/app/app.config.ts), paste the applicationUrl you just copied into the apiEndpoint
- Right click package.json, and select Restore Packages
- You can see progress in the Output window with Bower/npm as your selection in Show output from:
- Right click the solution, select Restore NuGet Packages
- Rebuild the solution
- Click the Green Run Button / Hit F5