This houses Instant's backend. Let’s get you started!
The easiest way to get started is to run make docker-compose
. That command will use docker compose to set up a new postgres database and start the server. The instant server will be available at http://localhost:8888 and you can connect to nrepl on port 6005
.
If you want to run Instant locally, first install dependencies:
-
Install Clojure https://clojure.org/guides/install_clojure.
-
Install golang-migrate https://github.com/golang-migrate/migrate/tree/master/cmd/migrate#installation.
Create a new postgres database called instant
:
createdb instant
Ensure your postgresql.conf
has logical replication enabled:
wal_level = logical
Run the migrations to initialize the database:
make dev-up
Bootstrap a config file (this creates a few dummy secrets for working locally):
make bootstrap-oss
And start the server:
make dev
The instant server will run at localhost:8888 and you can connect to nrepl on port 6005.
To run tests:
make test
If you want to make any changes to your configuration, update the resources/config/override.edn
file that was created when you ran make docker-compose
or make bootstrap-oss
. src/instant/config_edn.clj
has a spec that describes the data for the file, or you can look at resources/config/dev.edn
for an example.
If you have any questions, feel free to drop us a line on our Discord.