Skip to content

Bedford Park Store - Team Beta - Hackathon London 2018

License

Notifications You must be signed in to change notification settings

kloni/bedford-park

Repository files navigation

wch-stockholm-application

Source code for the IBM Digital Commerce and Watson Content Hub starter site application - Stockholm.

Prerequisites

  • A WCH tenant with Stockholm assets (i.e. WCH Storefront Manager Edition)
  • Node.js v8.10.0 or above Note: We recommend to run npm install after getting the latest from this repository to get the latest prerequisites.

Overview

This github repository contains all the source code files like javascript, css and html but not the Stockholm artifacts like pages, content types, categories, and content. WCH Storefront Manager tenants will have the Stockholm artifacts automatically deployed. Not sure if you have the Stockholm artifacts?

  • Log in to your tenant and go to the Website menu and check if Stockholm is rendering in the preview window.
  • Check SDK and SPA build levels from the browser
    • Open the dev console
    • Search for 'Build date' to get the current SPA level
    • Search for 'SDK version' to get the SDK version included in the SPA

You can compare the Build date with the date shown in the "Update the sample site" widget on the Home page to see if your deployed sample is older than the latest sample code. Instructions on how to update Stockholm to the latest can be found here: Updating your Stockholm sample.

Documentation

  1. Roadmap for developing your own site
  2. Site structure (Content model-How the sample site is built)
  3. Programming Model
  4. Watson Content Hub - Sites Development Overview
  5. Customizing the sample website
  6. Resources
  7. Updating your Oslo sample

Getting started for local development (installing pre-requisites)

  1. Make sure wchtools (npm install -g wchtools-cli) and ibm-wch-sdk-cli (npm install -g ibm-wch-sdk-cli) are installed Note: node should be at the latest release of version 8

  2. From your cli make sure to install project dependencies by running npm install

Configuring IDC and WCH tenant information for local development

This file determines from which WCH tenant site and layout information gets served from. And it also has the IDC tenant information.

  1. Update src/proxy.config.js to reflect your WCH tenant const DOMAIN_NAME = 'myX.digitalexperience.ibm.com'; const CONTENT_HUB_ID = 'c52c930e-5e66-4a3d-943c-a5f3127c6741';

  2. Update src/proxy.config.js to reflect your IDC information (it can point to your local IDC SDK or a non-production IDC tenant) const IDC_SEARCH_HOST = 'https://idcsdk.ibm.com:3738'; const IDC_TRANSACTION_HOST = 'https://idcsdk.ibm.com:5443';

Development server

Run npm start for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run npm run build to build the project. The build artifacts will be stored in the assets/ directory. Use the -prod flag for a production build.

Deployment to Watson Content Hub

Run npm run deploy to deploy the built code to Watson Content Hub. There is also a shortcut for building and deploying in one step via npm run build-deploy. Note that publishing can take up to 20 minutes for all updates to be available. In case you do not want to wait for the server side akamai cache to time out you can flush the cache via: wchtools clear --cache More information can be found here: Clearing the content delivery network cache

Running unit tests and end-to-end tests

See the included detailed documentation on running tests Running unit tests and end-to-end tests .

Resources

Find more details on the WCH development environment, technical documentation, sample applications, APIs and other information to jumpstart your development project.

Tools

API

Documentation

Samples

Support forum

License

See the included license file License .

About

Bedford Park Store - Team Beta - Hackathon London 2018

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •