Contact Manager Example
This example shows...
- A Vue.js client invoking Web API methods to add, update, and delete contacts
- A Vue.js client subscribing to the Subscription API via the Butterfly.Clients to receive updates when any data changes
- Implementing the Web API from Butterfly.Web on the server
- Implementing the Subscription API from Butterfly.Web on the server
- Using Butterfly.Db on the server to perform database operations and publish the data change events to subscribers
This example uses the MySQL database but Butterfly.Db supports multiple database engines.
See this article about building this example web app.
Get the Code
git clone https://github.com/firesharkstudios/butterfly-server
Run the Server
cd butterfly-server\Butterfly.Example.Contacts dotnet run
You can see the server code that runs at Program.cs.
Run the Client
cd butterfly-server\Butterfly.Example.Contacts\www npm install npm run serve
Open as many browser instances to http://localhost:8080/ as you wish to confirm the todo list stays synchronized across all connected clients.