Compare commits
8 Commits
81ab5b252b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b6d27da99 | |||
| 87a84d6443 | |||
| fedb515df1 | |||
| 383ba0d831 | |||
| af57f1a49d | |||
| 03af8d61c7 | |||
| e36f5bc579 | |||
| 1e15e20175 |
41
README.md
41
README.md
@@ -1,11 +1,13 @@
|
||||
# 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
|
||||
|
||||
This is the `fes new <project>` output
|
||||
## A Simple Example
|
||||
```lua
|
||||
-- project/www/index.lua as created from fes new project
|
||||
local fes = require("fes")
|
||||
local site = fes.fes()
|
||||
|
||||
@@ -14,32 +16,9 @@ site:h1("Hello, World!")
|
||||
return site
|
||||
```
|
||||
|
||||
This can be ran with `fes run <project>` where `<project>` is the location of the website.
|
||||
|
||||
## 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
|
||||
```
|
||||
$ fes run project
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
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`
|
||||
## Contributing
|
||||
See [fSD hacking](https://fsdproject.org/hacking) and [fSD community](https://fsdproject.org/community)
|
||||
|
||||
@@ -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)
|
||||
|
||||
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 {
|
||||
return dir
|
||||
} else {
|
||||
|
||||
@@ -40,7 +40,13 @@ func Start(dir string) {
|
||||
err = readArchive(w, route)
|
||||
} else {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ var gitCommit string = "devel"
|
||||
|
||||
const PROGRAM_NAME string = "fes"
|
||||
const PROGRAM_NAME_LONG string = "fes/fSD"
|
||||
const VERSION string = "1.0.1"
|
||||
const VERSION string = "1.1.0"
|
||||
|
||||
func Version() {
|
||||
fmt.Printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION)
|
||||
|
||||
Reference in New Issue
Block a user