Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.
/ presence Public archive

User presence service

Notifications You must be signed in to change notification settings

foxford/presence

Repository files navigation

Presence service

Set up

Install dev-dependencies (sqlx):

$ make deps

Run related services via docker-compose (postgres, nats):

$ make svc

Create database and run migrations:

$ sqlx database create
$ sqlx migrate run

Nats

  1. Install Nats client:
$ brew tap nats-io/nats-tools
$ brew install nats-io/nats-tools/nats
  1. Place the nats.creds file in the root of the project.

  2. Copy the nats.conf file and edit it:

cp docker/development/nats/nats.conf{.example,}
  1. Create a stream on Nats:
$ nats stream add classroom-out --creds=nats.creds --subjects='classroom.>' --storage=memory --replicas=1 --retention=interest --discard=new
# Next "Enter" for all questions 

Run the project

$ make run