Skip to content
sumedhb1995 edited this page Jun 17, 2020 · 18 revisions

Requirements

Running a Local Tinylicious Server

  1. Navigate to the ./server/tinylicious directory and build it.
npm i
npm run build
  1. If the build succeeds, start the tinylicious server
npm start
  1. Now, we can run components against this server. We will use Clicker as an example. Navigate to the Clicker directory and start the component using the start:tinylicious command
cd ./components/examples/clicker
npm run start:tinylicious

This command is running the following script for reference

webpack-dev-server --config webpack.config.js --package package.json --env.mode tinylicious
  1. Now navigate to http://localhost:8080 to see Clicker running on tinylicious

NOTE: tinylicious stores persisted data on your filesystem at /var/lib/tinylicious. On Windows, this will be C:/var/lib/tinylicious. If you want to clear everything and start fresh, then shut down tinylicious and delete that folder. The next time you start tinylicious everything should be as new.

Running a Routerlicious Server

This is the same server as https://www.wu2.prague.office-int.com/ (and other instances). This includes the server backend (the Fluid ordering service, etc.) and the web front-end gateway This will download and build the image that is deployed, and run it locally.

  1. Go to Docker settings and allocate at least 4 cores and 4GB Memory.

Docker Setup

  1. Navigate to the repo root. And run npm start (No need to build)

  2. If this succeeds, you can open your browser (preferably Chrome or new Microsoft Edge for ease of debugging) and navigate to http://localhost:3000 and test a component against it

Using a Local Routerlicious Server For Testing

  1. Navigate to the getkeys directory from the repo root and run the following commands which will ask you to authenticate
(Only needs to be done once, can be skipped in the future)
cd tools/getkeys
npm i
npm start
  1. After you authenticate, start the docker routerlicious server (see instructions above)

  2. Navigate to the component directory (i.e. Clicker) from the root and run the following

cd components/examples/clicker 
npm run start:docker
  1. Navigate to http://localhost:8080 and the component should be running against the local Docker routerlicious server

Using a Deployed Routerlicious Server For Testing

  1. Navigate to the getkeys directory from the repo root and run the following commands which will ask you to authenticate
(Only needs to be done once, can be skipped in the future)
cd tools/getkeys
npm i
npm start
  1. Navigate to the component directory (i.e. Clicker) from the root and run the following
cd components/examples/clicker 
npm run start:r11s
  1. Navigate to http://localhost:8080 and the component should be running against the deployed routerlicious server
Clone this wiki locally