Compare commits

...

8 Commits

Author SHA1 Message Date
1b6d27da99 Update README.md 2026-01-20 13:01:37 -05:00
87a84d6443 Update README.md 2026-01-20 13:01:13 -05:00
fedb515df1 rewrite README 2026-01-20 13:00:55 -05:00
383ba0d831 Merge branch 'rewrite' 2026-01-20 12:48:41 -05:00
af57f1a49d change the not found content 2026-01-20 12:47:58 -05:00
03af8d61c7 format 2026-01-20 12:47:44 -05:00
e36f5bc579 Merge pull request 'rewrite' (#1) from rewrite into main
Reviewed-on: #1
2026-01-19 16:17:56 -05:00
1e15e20175 add brewfile 2026-01-19 16:17:31 -05:00
5 changed files with 21 additions and 34 deletions

2
Brewfile Normal file
View File

@@ -0,0 +1,2 @@
# build deps
brew "go@1.25"

View File

@@ -1,11 +1,13 @@
# Fes # Fes
A lightweight, static, and opinionated microframework. Fes is an embedded Lua microwebframework for create static, extensible
websites. Using file-based routes you can easily strucutre you website just by
moving files around. See [fsdproject.org](https://fsdproject.org) for a
real-world example.
## Usage ## A Simple Example
This is the `fes new <project>` output
```lua ```lua
-- project/www/index.lua as created from fes new project
local fes = require("fes") local fes = require("fes")
local site = fes.fes() local site = fes.fes()
@@ -14,32 +16,9 @@ site:h1("Hello, World!")
return site return site
``` ```
This can be ran with `fes run <project>` where `<project>` is the location of the website. ```
$ fes run project
## Examples
See `examples/` for different features, `canonical/` contains the best practices for this microframework.
## Build
```sh
git clone https://git.vxserver.dev/fSD/fes.git
cd fes
go build .
./fes run examples/hello-world # if this works install
go install fes
``` ```
## Documentation ## Contributing
See [fSD hacking](https://fsdproject.org/hacking) and [fSD community](https://fsdproject.org/community)
Run `fes doc` for the documentation website or goto [docs.vxserver.dev](https://docs.vxserver.dev)
## License
ISC License
Copyright (C) 2025-2026 fSD
See `COPYING`

View File

@@ -118,7 +118,7 @@ Check out [Fes's docs](https://docs.vxserver.dev/static/fes.html).`, "$$", "`"),
ui.Hint("you can run this with `fes run %s`", dir) ui.Hint("you can run this with `fes run %s`", dir)
fmt.Println("Created new Fes project at", func () string { fmt.Println("Created new Fes project at", func() string {
if cwd, err := os.Getwd(); err != nil { if cwd, err := os.Getwd(); err != nil {
return dir return dir
} else { } else {

View File

@@ -40,7 +40,13 @@ func Start(dir string) {
err = readArchive(w, route) err = readArchive(w, route)
} else { } else {
w.WriteHeader(http.StatusNotFound) w.WriteHeader(http.StatusNotFound)
w.Write([]byte("not found :(")) w.Write([]byte(`<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>fes</center>
</body>
</html>`))
} }
return return
} }

View File

@@ -9,7 +9,7 @@ var gitCommit string = "devel"
const PROGRAM_NAME string = "fes" const PROGRAM_NAME string = "fes"
const PROGRAM_NAME_LONG string = "fes/fSD" const PROGRAM_NAME_LONG string = "fes/fSD"
const VERSION string = "1.0.1" const VERSION string = "1.1.0"
func Version() { func Version() {
fmt.Printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION) fmt.Printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION)