A small project that collects various nice things to get started with Go Web Development.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

56 lines
1.6 KiB

# Go Web Starter Kit
This is a fairly complete web development starter kit in Go. It tries to
be as simple as possible without leaving out modern features like reactive UIs and database
migrations. A primary thing that's included is working authentication, since that's the main thing
holding people back when they first start, and also the easiest to get wrong.
In fact, if you look at how I do it in this first version it is _WRONG_ so do not use this in
production yet until I can make it correct. Just use it to learn for now.
## Getting Started
You can get use this project working by doing this:
```shell
git clone \
https://git.learnjsthehardway.com/learn-code-the-hard-way/go-web-starter-kit.git my-project
cd my-project
```
Then on Linux/OSX you want to delete the `.git` with this:
```shell
rm -rf .git
```
And on Windows you use the ever more clear and totally easier:
```shell
rm -recurse -force .git
```
Once you have that you can make it your own:
```shell
git init .
go mod tidy
cp config_example.toml config.toml
make dev
```
> __Warning__ On Windows you'll probably be asked to give the `webapp.exe` access to
the Public and Private networks to use it.
You don't have to use the `Makefile` but it's a lot easier than memorizing the various commands.
You can access the site by visiting https://127.0.0.1:7002/ but keep in mind this is the [Air](https://github.com/air-verse/air)
port, not _your_ site's port. Air is a tool that will rebuild your Go project whenever you change
the code (but _NOT_ HTML/CSS, because that's annoying).
## Configuration
## Tour of Directories
## More...