LocalServer is a Windows Go server that serves local HTML files, provides a built-in HTML editor at /, and syncs discovered pages into the Obsidian canvas file at C:\Users\java\Documents\Obsidian Vault\BOARDS\LocalServer.canvas.
- Serves local files from
C:\LocalServer - Opens the HTML editor on the home page
- Accepts pasted HTML or dropped
.htmlfiles - Saves files with either a user-supplied name or a generated random name
- Adds saved pages to the canvas automatically
Build and run the server:
cd C:\LocalServer
go build -o canvas_server.exe main.go
.\canvas_server.exeThe server listens on port 8888.
Open:
http://localhost:8888/
You can paste raw HTML into the editor or drag and drop an .html file.
- Enter a custom filename, or leave it blank to generate a random name.
- The
.htmlextension is added automatically when needed. - Saved files are written to
C:\LocalServer.
To run it in the background and autostart with Windows, use NSSM.
- Download NSSM and place
nssm.exesomewhere on your PATH, or use the full path. - Install the service:
nssm install LocalServer "C:\LocalServer\canvas_server.exe"- Set the service to start automatically if needed:
nssm set LocalServer Start SERVICE_AUTO_START- Start it:
net start LocalServer- Stop it:
net stop LocalServer- The editor route is internal and is not scanned into the canvas.
- If you want the server to restart after changes, rebuild
canvas_server.exeand restart the service.