Re WebService
Pre-requisites
- Elixir
- PostgreSQL
Install
-
Install dependencies with
mix deps.get
-
Create, migrate and seed your database with
cd apps/re && mix ecto.setup
-
Rename
config/dev.secret-example.exs
toconfig/dev.secret.exs
and follow instructions at the top of the file to generate necessary keys.
Setup elasticsearch (optional)
- Download and install (comes with kibana):
mix elasticsearch.install . --version 6.2.4
- Run elasticsearch:
./elasticsearch/bin/elasticsearch
and checkhttp://localhost:9200
- Run kibana:
./kibana/bin/kibana
and checkhttp://localhost:5601
- Optionally, uncomment the lines in
application.ex
to runelasticsearch
andkibana
together with the application - Create listings index:
mix elasticsearch.build listings --existing --cluster ReIntegrations.Search.Cluster
(seeReIntegrations.Search
for more operations)
Test
- Run
mix test
Run
- Start Phoenix endpoint with
mix phx.server
- Check
http://localhost:4000/graphql_api
- WebSocket subscriptions at
ws://localhost:4000/socket
Production
To see backend endpoint in production:
https://api.emcasa.com/
At the moment, we're tracking tasks at https://www.pivotaltracker.com/n/projects/2125081
Possible issues
Use asdf
or check the tools versions in .tools-version