Variables needed to connect application to running Redis server are defined in /config/dev.secret.exs
Defaults are:
redis_host: "http://localhost"
redis_port: "6379"
You can execute the following to download and start Redis server with the above prerequisites
bash install.sh
cd redis-5.0.8 && src/redis-server
Database record keys are prefixed with 'funbox_test.'
To start Phoenix server:
- Install dependencies with
mix deps.get
- Install Node.js dependencies with
cd assets && npm install
- Start Phoenix endpoint with
mix phx.server
To run tests execute
mix test
It will automaticly populate test data to database in order for tests to succeed.
Application accepts request to:
-
POST /visited_links
Data example:
{
"links": [
"https://ya.ru",
"https://ya.ru?q=123",
"funbox.ru",
"https://stackoverflow.com/questions/11828270/how-to-exit-the-vim-editor"
]
}
Content-Type "application/json" -
GET /visited_domains?from={timestamp_in_seconds}&to={timestamp_in_seconds}