2026-01-09 21:15:42 +01:00
2026-01-09 18:43:33 +01:00
2026-01-09 19:56:07 +01:00
2026-01-09 21:15:42 +01:00
2025-12-02 16:38:33 +01:00
2026-01-08 16:17:37 +01:00
2026-01-09 18:43:33 +01:00
2026-01-05 14:34:03 +01:00
2026-01-09 19:20:18 +01:00
2026-01-09 19:47:59 +01:00
2026-01-09 19:23:11 +01:00
2026-01-08 16:33:39 +01:00

Server

Contributing

Running locally

Environment

Define the following required environment variables:

Variable Description Example Value
IMGFLOAT_ASSETS_PATH Filesystem path to store uploaded assets /var/imgfloat/assets
IMGFLOAT_PREVIEWS_PATH Filesystem path to store generated image previews /var/imgfloat/previews
IMGFLOAT_DB_PATH Filesystem path to the SQLite database file /var/imgfloat/imgfloat.db
IMGFLOAT_INITIAL_TWITCH_USERNAME_SYSADMIN Twitch username of the initial sysadmin user example_broadcaster
IMGFLOAT_GITHUB_CLIENT_OWNER GitHub user or org which has the client repository imgfloat
IMGFLOAT_GITHUB_CLIENT_REPO Client repository name client
IMGFLOAT_GITHUB_CLIENT_VERSION Client release version used for download links 1.2.3
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE Maximum upload file size 10MB
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE Maximum upload request size 10MB
TWITCH_CLIENT_ID Oauth2 client id i1bjnh4whieht5kzn307nvu3rn5pqi
TWITCH_CLIENT_SECRET Oauth2 client secret vpkn8cp7ona65l121j6q78l9gkmed3

Optional:

Variable Description Example Value
IMGFLOAT_COMMIT_URL_PREFIX Git commit URL prefix used for the build link badge (unset to hide the badge) https://github.com/imgfloat/server/commit/
TWITCH_REDIRECT_URI Override default redirect URI http://localhost:8080/login/oauth2/code/twitch

During development environment variables can be placed in the .env file at the project root to automatically load them. Be aware that these are only loaded when using the Makefile command make run.

If you want to use the default development setup your .env file should look like this:

TWITCH_CLIENT_ID=...
TWITCH_CLIENT_SECRET=...
IMGFLOAT_GITHUB_CLIENT_OWNER=...
IMGFLOAT_GITHUB_CLIENT_REPO=...
IMGFLOAT_GITHUB_CLIENT_VERSION=...
IMGFLOAT_INITIAL_TWITCH_USERNAME_SYSADMIN=...

Build and run

To run the application:

$ make run
...
...  : Tomcat started on port 8080 (http) with context path ''

If you want live compilation run the watch command in a separate terminal. Note that this doesn't automatically reload the browser; this has to be done manually.

$ make watch
...
[INFO] BUILD SUCCESS

This automatically re-compiles the project when source files change. entr is required for this to work.

Description
No description provided
Readme MIT 6.6 MiB
Languages
Java 54.5%
JavaScript 29.8%
HTML 9.1%
CSS 6.3%
Makefile 0.2%