GoWeb/README.md

66 lines
2.6 KiB
Markdown
Raw Normal View History

2023-03-07 03:02:41 +00:00
# GoWeb 🌐
2023-03-06 18:58:58 +00:00
GoWeb is a simple Go web framework that aims to only use the standard library. The overall file structure and
development flow is inspired by larger frameworks like Laravel. It is partially ready for smaller projects if you are
fine with getting your hands dirty, but I plan on having it ready to go for more serious projects when it hits version
2.0.
<hr>
2023-03-07 03:02:41 +00:00
## Current features 🚀
2023-03-06 18:58:58 +00:00
- Routing/controllers
- Templating
- Simple database migration system
2023-08-01 01:18:11 +00:00
- Built in REST client
2023-03-06 18:58:58 +00:00
- CSRF protection
2023-08-01 01:18:11 +00:00
- Middleware
2023-03-06 18:58:58 +00:00
- Minimal user login/registration + sessions
- Config file handling
2023-04-08 02:32:39 +00:00
- Scheduled tasks
2023-09-04 20:20:21 +00:00
- Entire website compiles into a single binary (~10mb) (excluding env.toml)
2023-03-06 18:58:58 +00:00
- Minimal dependencies (just standard library, postgres driver, and experimental package for bcrypt)
<hr>
2023-03-07 03:02:41 +00:00
## When to use 🙂
2023-03-06 18:58:58 +00:00
- You need to build a dynamic web application with persistent data
- You need to build a dynamic website using Go and need a good starting point
- You need to build an API in Go and don't know where to start
- Pretty much any use-case where you would use Laravel, Django, or Flask
2023-03-07 03:02:41 +00:00
## When not to use 🙃
2023-03-06 18:58:58 +00:00
- You need a static website (see [Hugo](https://gohugo.io/))
- You need a simple blog (see [Hugo](https://gohugo.io/))
- You need a simple site for your projects' documentation (see [Hugo](https://gohugo.io/))
2023-03-07 03:02:41 +00:00
## How to use 🤔
2023-03-06 18:58:58 +00:00
1. Clone
2023-09-03 21:18:48 +00:00
2. Delete the git folder, so you can start tracking in your own repo
3. Run `go get` to install dependencies
2023-09-04 20:20:21 +00:00
4. Copy env_example.toml to env.toml and fill in the values
2023-09-03 21:18:48 +00:00
5. Run `go run main.go` to start the server
6. Rename the occurences of "GoWeb" to your app name
7. Start building your app!
8. When you see useful changes to GoWeb you'd like in your project copy them over
2023-03-06 18:58:58 +00:00
2023-03-07 03:02:41 +00:00
## How to contribute 👨‍💻
2023-03-06 19:10:50 +00:00
2023-03-07 03:34:12 +00:00
- Open an issue on GitHub if you find a bug or have a feature request.
2023-03-06 19:10:50 +00:00
- [Email](mailto:contact@mpatterson.xyz) me a patch if you want to contribute code.
- Please include a good description of what the patch does and why it is needed, also include how you want to be
credited in the commit message.
2023-03-06 19:00:11 +00:00
<hr>
2023-03-07 03:02:41 +00:00
### License and disclaimer 😤
2023-03-06 18:58:58 +00:00
- You are free to use this project under the terms of the MIT license. See LICENSE for more details.
- You and you alone are responsible for the security and everything else regarding your application.
- It is not required, but I ask that when you use this project you give me credit by linking to this repository.
- I also ask that when releasing self-hosted or other end-user applications that you release it under
2023-09-04 20:20:21 +00:00
the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html) license. This too is not required, but I would appreciate it.