Skip to content

Releases: SuiteBee/NorthWindWeb

Version 0.1.0

18 Feb 21:52
a80b1ba

Choose a tag to compare

Initial release for Northwind Web

Usage

Important

Login credentials

username: adodsworth
password: Northwind1

Steps to run locally as Release

Warning

Serving the release build will also require the API back-end to be running the release executable

This method should have the least number of dependencies required to run

Steps

Prerequisites

  1. Download latest release of NorthWindAPI.NET
  2. Install npm package local-web-server
$ npm install -g local-web-server
  1. Download the attached release zip below

Start API

  1. Extract files from NorthWindAPI release
  2. Open NorthWindAPI.exe and leave running
  3. This will start the API listening on port 5000

Start web server

  1. Extract files from attached release below
  2. Open a command prompt or bash window
  3. Navigate to the location of the extracted release
  4. Execute the following
$ ws --spa index.html
  1. This will start the web server and display the ports where it is served
  2. Open browser and navigate to
http://localhost:8000/
  1. Login with supplied credentials (token is valid for 30 minutes)

Steps to build from source

Warning

Building from source also requires the API back-end to also be built from source

This method will require an IDE like visual studio and potentially some .NET runtimes or other dependencies to build

Steps

Prerequisites

  1. Visual Studio or the .NET CLI
  2. IIS Express
  3. React development environment

Start API

  1. Open NorthWindAPI.sln
  2. Run targeting IIS Express
  3. Browser will open and display the OpenAPI specification page
  4. Take note of the port within this URL

Start web server

  1. Within your react dev environment
  2. Run the following command
npm run dev
  1. Browser will open to the login page
  2. Login with supplied credentials (token is valid for 30 minutes)

Pitfalls

If the login page displays an error questioning if the API server is running, verify the URL port in

NorthWindWeb/src/components/api/NorthWindClient.jsx

matches the one that the OpenAPI spec is displayed at

If it still doesn't work you may need to add the port that the site is being served on to the CORS whitelist in

NorthWindAPI.NET\Program.cs