Florian Sylvain ea942355ab feat: templ_static_files_validator
super_build.bat script was removed because it became unnecessary after transitioning to a Docker-based build process which provides cross-platform build capability more efficiently (and Windows scripting sucks). Also added templ_static_files_validator.sh that validates existence of files linked in HTML within the specified directory. Can be useful when working on frontend to make sure static files will load properly.
2023-09-06 04:36:14 +02:00
2023-08-12 02:33:40 +02:00
2023-08-12 02:33:40 +02:00

GohCMS

🚧 This project is under development !

The features are not complete, not fully tested and subject to many changes.

Setup

Don't forget to setup the Environment variables!

Use with Docker

Compose

The easiest way to run the project is to use docker-compose. You still need to set up the environment variables, but you can use the .env file for that. Note that some supplementary variables are required for docker-compose to work, like DOCKER_DB_FOLDER.

docker compose up --build -d

Build and run it yourself

Build

There are 2 scripts to build the project:

  • super_build.sh
  • super_build.bat

They will build the project for windows, linux and macOS. The binaries will be in the bin folder. You can also really just use go build to build the project for your current OS.

Run

Once the project is built, you can simply run the binary for your OS. Setting the environment variables is of course required, but not necessarily via the .env file.

Environment variables

Name Type Description Comment
ENVIRONMENT string The environment the API is running in required, development or production
PORT int The port the API will use required
CORS_ALLOWED_ORIGINS string The allowed origins for CORS required, semicolon separated list
DB_FILE string The path to the sqlite db file required, can be at the root but name still required (e.g. ./gohcms.db) ; have to end up with .db
DOCKER_DB_FOLDER string The path to the sqlite db file's folder required with docker, this will basically be the host machine folder that contains the sqlite db file

API Usage

TODO

Demo

TODO

S
Languages
Go 61.3%
HTML 36.4%
Shell 2%
Dockerfile 0.3%