Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tkindy/synchro
Make plans with friends
https://github.com/tkindy/synchro
Last synced: 2 days ago
JSON representation
Make plans with friends
- Host: GitHub
- URL: https://github.com/tkindy/synchro
- Owner: tkindy
- Created: 2022-08-13T14:55:15.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-04T01:52:42.000Z (5 months ago)
- Last Synced: 2024-06-04T03:17:48.746Z (5 months ago)
- Language: Clojure
- Homepage: https://synchro.tylerkindy.com/
- Size: 398 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Synchro
https://synchro.tylerkindy.com/
## Development
### Philosophy
I wanted to try building a web app in the "classic" web style.
That means:- Server-rendered pages
- Sending data to the server with form submissions
- No AJAX
- Minimal JavaScript### Configuration
The app expects a `config.edn` file in the current working directory which contains a map with the following values:
- `:http`
- `:session-secret` - a 16-byte hex string used to encrypt and decrypt session cookies. See "[Generating session secret](#generating-session-secret)" below.
- `:db`
- `:dbname` - The name of the PostgreSQL database to connect to
- `:user` - The username to use when connecting to the database
- `:password` - The password to use when connecting to the database
- `:migrate-on-startup?` - Whether to run database migrations on app startupIt also expects the following parameters passed at the command line:
- `-p`, `--port`: the port to bind the HTTP server on. Defaults to 8080.
### Building an uberjar
The build functions are defined in `build.clj`.
```
clj -T:build uber
```### REPL
Use the `:repl` alias when starting up, then evaluate `(auto-refresh)` in `dev.clj`.
This starts up the system and automatically refreshes it when you make changes to one of the tracked paths.#### Migrations
Migrations use [migratus](https://github.com/yogthos/migratus).
To create a new migration, call `com.tylerkindy.synchro.db.migrations/create` passing the migration name.
If configured, the app will run migrations on startup.
During development, use the utility functions in the migrations namespace.### Generating session secret
```
openssl rand 16 -hex
```