|
package server
|
|
|
|
import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
"net/http"
|
|
|
|
"github.com/gomarkdown/markdown"
|
|
)
|
|
|
|
func notesFile(path Path, w http.ResponseWriter, r *http.Request) {
|
|
b, _ := ioutil.ReadFile(path.Local)
|
|
content := markdown.ToHTML(b, nil, nil)
|
|
fmt.Fprintf(w, "%s\n", content)
|
|
}
|