command
Version:
v0.4.4
Opens a new window with list of versions in this module.
Published: Jun 6, 2021
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Hello World Example
Tags: Models
Description
Simple service serving a message to the world.
Prerequisite
- Download and install Go
- Install NATS Server and Resgate (done with 3 docker commands).
Install and run
git clone https://github.com/jirenius/go-res
cd go-res/examples/01-hello-world
go run .
Things to try out
Access API through HTTP
Access API through WebSocket
- Open Chrome and go to resgate.io - resource viewer.
- Type in the resource ID below, and click View:
example.model
Note
Chrome allows websites to connect to localhost, while other browsers may give a security error.
Real time update on static resource
- Stop the project, and change the
"Hello, World!"
message in main.go.
- Restart the project and observe how the message is updated in the viewer (see above).
Get resource with ResClient
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.