ACM at CSUF club API for managing events, announcements, forms, and other services! Keep reading for information on setting up this project locally, and see the contributor guide and developer-docs/ for more information on using and contributing to this project.
This project requires that you have Go, sqlc, GNU Make, and optionally Air installed. We highly recommend using the provided Nix development environment instead of installing everything manually.
-
Install nix and direnv if you don't already have them
-
Run
direnv allowat the project root
If you don't have direnv, you can also use
nix developto enter the dev shell, but your environment variables won't get sourced automatically.
Using make will compile both the API and CLI binaries, located at
bin/acmcsuf-api and bin/acmcsuf-cli respectively. If you installed direnv,
both of these binaries will be automatically added to your path. You can run
them directly like:
acmcsuf-api # Run API server
acmcsuf-cli # Start CLI client (start API server before using)Air will recompile the project on the fly so you don't have to restart the server when you make changes.
airOR
make run # Compiles and runs directly (no hot-reloading)The API server is configurable via environment variables. See .env.example for
values you can override and configure in your .env file.
The CLI is a simple command-line client for the API server. Make sure the API server is running before using.
Output of acmcsuf-cli --help:
A CLI tool to help manage the API of the CSUF ACM website
Usage:
acmcsuf-cli [command]
Available Commands:
announcements Manage ACM CSUF's Announcements
completion Generate the autocompletion script for the specified shell
events A command to manage events.
help Help about any command
officers A command to manage officers.
Flags:
-h, --help help for acmcsuf-cli
-v, --version version for acmcsuf-cli
Use "acmcsuf-cli [command] --help" for more information about a command.
make check # Run checks
make test # Run tests (None yet)
make fix-sql # Format and fix SQL files
make clean # Removes all build artifacts
make help # Display all targetsDeveloped with 💚 by @acmcsufoss