https://github.com/simplyyan/lostpapyrus
A fast, light, easy and comprehensive Go framework.
https://github.com/simplyyan/lostpapyrus
backend go golang http http-client http-requests http-server server serverless-framework
Last synced: 10 months ago
JSON representation
A fast, light, easy and comprehensive Go framework.
- Host: GitHub
- URL: https://github.com/simplyyan/lostpapyrus
- Owner: simplyYan
- License: bsd-3-clause
- Created: 2024-06-09T13:30:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-27T18:02:37.000Z (over 1 year ago)
- Last Synced: 2025-03-28T09:21:41.881Z (10 months ago)
- Topics: backend, go, golang, http, http-client, http-requests, http-server, server, serverless-framework
- Language: Go
- Homepage: https://github.com/simplyYan/LostPapyrus/wiki/Docs
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# LostPapyrus
LostPapyrus is a minimalist and fast web framework for Go (Golang). It aims to be easy to use, fast, and feature-rich, providing a broad range of functionalities for building web applications.
## Features
- Simple and intuitive API
- Supports GET and POST routes
- Middleware support
- JSON response handling
- Route parameters
## Installation
To install LostPapyrus, use the following command:
```bash
go get -u github.com/simplyYan/LostPapyrus
```
## Quick Start
Here is a simple example to get you started with LostPapyrus:
```go
package main
import (
"fmt"
"github.com/simplyYan/LostPapyrus"
"net/http"
)
func main() {
app := lostpapyrus.New()
app.Use(func(ctx *lostpapyrus.Context, next lostpapyrus.HandlerFunc) {
fmt.Println("Middleware before")
next(ctx)
fmt.Println("Middleware after")
})
app.Get("/", func(ctx *lostpapyrus.Context) {
ctx.Send("Welcome to LostPapyrus!")
})
app.Get("/hello/:name", func(ctx *lostpapyrus.Context) {
name := ctx.Params["name"]
ctx.Send(fmt.Sprintf("Hello, %s!", name))
})
app.Post("/echo", func(ctx *lostpapyrus.Context) {
var data map[string]interface{}
if err := ctx.BindJSON(&data); err != nil {
ctx.Status(http.StatusBadRequest).Send("Invalid JSON")
return
}
ctx.JSON(data)
})
app.Listen(":3000")
}
```
## Contributing
We welcome contributions from the community. To contribute to LostPapyrus, you can:
1. **Open an Issue**: If you find a bug or have a feature request, please open an issue on the GitHub repository.
2. **Submit a Pull Request**: If you want to contribute code, fork the repository, make your changes, and submit a pull request. Please ensure your code follows the project's coding standards and includes appropriate tests.
## License
LostPapyrus is released under the BSD-3-Clause license. See the LICENSE file for more details.
---
Thank you for using LostPapyrus! If you have any questions or need further assistance, feel free to open an issue on the GitHub repository.