This repo contains two options for managing your project: a shell script, and a Makefile.
To make your redbean launch a browser on start, uncomment
LaunchBrowserOnStart() in srv/.init.lua.
M1 Mac users should use the default MODE instead of asan-, this can be set
in the top of your Makefile/build.sh
build.sh init: download Redbean, zip, and sqlitebuild.sh pack: put contents ofsrv/into a fresh redbean, overwriting previously existing bean.build.sh run: pack and then execute custom command found at top of file
Stock redbeans are hidden with dots. Executables are excluded in the
.gitignore. Since they are Actually Portable, you could disable this
behavior and commit the executables directly, if you're ok with keeping them in
the git store. Also remember that binaries have a certain risk profile of their
own.
You can also use make to do the above.
makewill domake download+make addmake downloadwill download all of the requirements.make addzips the contents of/srvinto yourredbean.com.make startormake start-daemonwill start the webserver (in foreground and background, respectively)
See also: make stop-daemon, make restart-daemon, make log, make ls
- Build.sh
- INIT:
build.sh init [-s for sqlite?]- Fetch Redbean, save as read-only stock build.
- Also fetch zip & sqlite
- make sqlite opt-in
- Verify checksums for known versions/generate checksums for new ones
- PACK (default with no arguments)
- force copy stock redbean to writable file. Zip contents of
srv/into zip - user-specified actions: if one script named
packer*exists and is executable, run it - if sqlite.com and
default.sqliteexist, force copydefault.sqlitetodb.sqlite
- force copy stock redbean to writable file. Zip contents of
- RUN
- pack and then execute command specified in variable
- INIT:
- VSCode integration by Danny Robinson (stellartux)
- Makefile by Jared Miller (shmup)