This repo is a Fluid starter template that was created to answer the question "how do I create a Fluid app that is more complex than Hello World?" To answer this question this repo makes the following assumptions:
- You want to use Angular for your view
- You want to keep clear separation between your model and view
- You want a light state management framework to remove the boilerplate needed to store, access and modify Angular app state
- You already have Node installed on your local machine. If not, follow the instructions here.
In this readme we'll walk you through the following topics:
- Run the app locally
- Modify the schema to include additional DDSes
To run our local server, Tinylicious, on the default values of localhost:7070, enter the following into a terminal window:
npx tinylicious
Now, with our local service running in the background, we need to connect the application to it. The app has already been configured to this so now we just need to run the following in a new terminal window to start the app.
npm i
npm run startInside of src/app/app.component.ts, you can define the initialObjects that are returned by the container in the containerSchema.
To add another DDS to this list, make sure that the DDS is imported from fluid-framework, select a key, and add the DDS to initialObjects.
import { SharedMap, SharedCounter } from 'fluid-framework';
export const containerSchema = {
initialObjects: {
myMap: SharedMap,
myCounter: SharedCounter
},
};