Данная пошаговая инструкция поможет освоить основы на простом примере
Для справки
Сервер поднимался на Debian 8 c характеристиками:
CPU - 1 ядро x 500 МГц
| /** | |
| * Created by Emerald Powder for video tutorial https://youtu.be/zi3l2etjpFM | |
| **/ | |
| using System.IO; | |
| using System.Linq; | |
| using UnityEditor; | |
| using UnityEngine; | |
| public class TreeBase : MonoBehaviour |
| console.log('Client-side code running'); | |
| const button = document.getElementById('myButton'); | |
| button.addEventListener('click', function(e) { | |
| console.log('button was clicked'); | |
| fetch('/clicked', {method: 'POST'}) | |
| .then(function(response) { | |
| if(response.ok) { | |
| console.log('click was recorded'); |
| <?xml version="1.0" encoding="utf-8" ?> | |
| <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
| <CodeSnippet Format="1.0.0"> | |
| <Header> | |
| <Title>dw</Title> | |
| <Shortcut>dw</Shortcut> | |
| <Description>Code snippet for Debug.WriteLine</Description> | |
| <Author>Chris Schmich</Author> | |
| <SnippetTypes> | |
| <SnippetType>Expansion</SnippetType> |