diff --git a/.air.toml b/.air.toml index b9d186a..0a7ce75 100644 --- a/.air.toml +++ b/.air.toml @@ -3,10 +3,10 @@ testdata_dir = "testdata" tmp_dir = "tmp" [build] - cmd = "make build" + cmd = "go build -v -o .\\tmp\\urchin.exe .\\cmd\\urchin" args_bin = [] - bin = "./tmp/urchin" - full_bin = "./tmp/urchin --config urchin_config.toml" + bin = ".\\tmp\\urchin.exe" + full_bin = ".\\tmp\\urchin.exe --config urchin_config.toml.exe" delay = 1000 exclude_dir = ["assets", "tmp", "vendor", "testdata"] exclude_file = [] diff --git a/.air_windows.toml b/.air_windows.toml new file mode 100644 index 0000000..0a7ce75 --- /dev/null +++ b/.air_windows.toml @@ -0,0 +1,46 @@ +root = "." +testdata_dir = "testdata" +tmp_dir = "tmp" + +[build] + cmd = "go build -v -o .\\tmp\\urchin.exe .\\cmd\\urchin" + args_bin = [] + bin = ".\\tmp\\urchin.exe" + full_bin = ".\\tmp\\urchin.exe --config urchin_config.toml.exe" + delay = 1000 + exclude_dir = ["assets", "tmp", "vendor", "testdata"] + exclude_file = [] + exclude_regex = ["_templ.go"] + exclude_unchanged = false + follow_symlink = false + include_dir = [] + include_ext = ["go", "tpl", "tmpl", "templ", "html"] + include_file = [] + kill_delay = "0s" + log = "build-errors.log" + poll = false + poll_interval = 0 + post_cmd = [] + pre_cmd = [] + rerun = false + rerun_delay = 500 + send_interrupt = false + stop_on_error = false + +[color] + app = "" + build = "yellow" + main = "magenta" + runner = "green" + watcher = "cyan" + +[log] + main_only = false + time = false + +[misc] + clean_on_exit = false + +[screen] + clear_on_rebuild = false + keep_scroll = true diff --git a/migrations/20240116222307_add_complex_post_example.sql b/migrations/20240116222307_add_complex_post_example.sql index e9850c8..58abd5a 100644 --- a/migrations/20240116222307_add_complex_post_example.sql +++ b/migrations/20240116222307_add_complex_post_example.sql @@ -1,14 +1,14 @@ -- +goose Up -- +goose StatementBegin INSERT INTO posts(title, content, excerpt) VALUES( - 'My Very First Post', - '# Urchin 🐚 + 'My Second Post', + '# CMS FOR GO -Urchin is a headless CMS (Content Management System) written in Golang, designed to be fast, efficient, and easily extensible. It allows you to +CMS FOR GO is a headless CMS (Content Management System) written in Golang, designed to be fast, efficient, and easily extensible. It allows you to create a website or blog, with any template you like, in only a few commands. -## Features 🚀 +## Features - **Headless Architecture:** Adding pages, posts, or forms should all be done with easy requests to the API. @@ -21,7 +21,7 @@ commands. Ensure you have Golang installed on your system before proceeding with the installation. ```bash -go get -u github.com/username/urchin +go get -u github.com/username/CMSGO ``` ## Example - Running the App @@ -31,17 +31,17 @@ template, simply build and start the app with the following commands. ```bash go build -./urchin +./cms-for-go ``` -This will start Urchin on `http://localhost:8080`. You can customize +This will start CMS FOR GO on `http://localhost:8080`. You can customize the configuration by providing the necessary environment variables. For more information, see the [configuration settings](#configuration). ## Dependencies -Urchin relies on the following Golang dependencies: +CMSGO relies on the following Golang dependencies: - [Gin](github.com/gin-gonic/gin) as the web framework for Golang. - [ZeroLog](https://github.com/rs/zerolog) for logging. @@ -54,22 +54,22 @@ it makes integrating `envfile`s quite easy. The following list outlines the environment variables needed. -- `URCHIN_DATABASE_ADDRESS` should contain the database addres, +- `CMSGO_DATABASE_ADDRESS` should contain the database addres, e.g. `localhost`. -- `URCHIN_DATABASE_PORT` should be the connection port to the +- `CMSGO_DATABASE_PORT` should be the connection port to the database. For example `3306`. -- `URCHIN_DATABASE_USER` is the database username. -- `URCHIN_DATABASE_PASSWORD` needs to contain the database +- `CMSGO_DATABASE_USER` is the database username. +- `CMSGO_DATABASE_PASSWORD` needs to contain the database password for the given user. ## License -Urchin is released under the MIT License. See LICENSE (TODO) for +CMS FOR GO is released under the MIT License. See LICENSE (TODO) for details. Feel free to fork, modify, and use it in your projects!', -'This is Urchin! This post is an example of how markdown can be rendered as a post.'); +'This is CMS FOR GO! This post is an example of how markdown can be rendered as a post.'); -- +goose StatementEnd -- +goose Down -- +goose StatementBegin DELETE FROM posts ORDER BY id DESC LIMIT 1; --- +goose StatementEnd +-- +goose StatementEnd \ No newline at end of file diff --git a/urchin_config.toml b/urchin_config.toml.exe similarity index 100% rename from urchin_config.toml rename to urchin_config.toml.exe