Your first page
With your project created and the server running, let’s edit its initial page.
If you have not created a project yet, follow the quick start first.
Your first page
Open the file:
pages/index.gox Its initial content is:
module index
import "github.com/gox-lang/gox"
func GET(ctx *gox.Context) gox.Page {
return <h1>Hello Gox</h1>
} Replace its content with:
module index
import "github.com/gox-lang/gox"
func GET(ctx *gox.Context) gox.Page {
return <main>
<h1>Mi primera aplicación GOX</h1>
<p>La aplicación está funcionando.</p>
</main>
} When you save the file, GOX will detect the changes and recompile the page. When you refresh the browser, you will see the new version.