iris/plugin/editor
2016-05-30 17:08:09 +03:00
..
editor.go Version 3.0.0-beta cleaned 2016-05-30 17:08:09 +03:00
README.md Version 3.0.0-beta cleaned 2016-05-30 17:08:09 +03:00

Package information

Editor Plugin is just a bridge between Iris and alm-tools.

alm-tools is a typescript online IDE/Editor, made by @basarat one of the top contributors of the Typescript.

Iris gives you the opportunity to edit your client-side using the alm-tools editor, via the editor plugin.

This plugin starts it's own server, if Iris server is using TLS then the editor will use the same key and cert.

How to use


package main

import (
	"github.com/kataras/iris"
	"github.com/kataras/iris/plugin/editor"
)

func main(){
	e := editor.New("username","password").Port(4444).Dir("/path/to/the/client/side/directory")

	iris.Plugins().Add(e)

	iris.Get("/", func (ctx *iris.Context){})

	iris.Listen(":8080")
}


Note for username, password: The Authorization specifies the authentication mechanism (in this case Basic) followed by the username and password. Although, the string aHR0cHdhdGNoOmY= may look encrypted it is simply a base64 encoded version of :. Would be readily available to anyone who could intercept the HTTP request. Read more.

The editor can't work if the directory doesn't contains a tsconfig.json.

If you are using the typescript plugin you don't have to call the .Dir(...)