How to use the dotnetify.hubServerUrl function in dotnetify

To help you get started, we’ve selected a few dotnetify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dsuryd / dotnetify-react-demo / ElectronHelloWorld / renderer.js View on Github external
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.

import React from 'react'
import ReactDOM from 'react-dom'
import HelloWorld from './HelloWorld.jsx'
import dotnetify from 'dotnetify';

dotnetify.hubServerUrl = "http://localhost:5000";

ReactDOM.render(, document.getElementById('Content'))
github dsuryd / dotnetify-react-demo / HelloWorld / src / HelloWorld.jsx View on Github external
import React from 'react';
import dotnetify from 'dotnetify';

dotnetify.hubServerUrl = "http://localhost:5000";

class HelloWorld extends React.Component {
    constructor(props) {
        super(props);
        dotnetify.react.connect("HelloWorld", this);
        this.state = { Greetings: "", ServerTime: "" };
    }
    render() {
        return (
            <div>
                <p>{this.state.Greetings}</p>
                <p>Server time is: {this.state.ServerTime}</p>

                <p>
                    You can also edit <code>HelloWorld.cs</code>, save 
                    to rebuild the server, and do page reload.</p></div>