- Run
bundle
to install project dependencies; - Run
rails db:create
to create database; - Run
rails s
to start server, port: 3000.
To run Specs, use the command rspec
- Send a
POST
request to/account
with the following payload:
{
"name": "<username>",
"email": "<email>",
"password": "<password>"
}
- Send a
POST
request to/auth/login
with the following payload:
{
"id": "<account id>",
"password": <password>
}
- You will receive a JWT and it's expiration date
- To see account's balance, send a
GET
request to/accounts/:account_id
, with the JWT obtained in previous steps
- Send
POST
request to/accounts/:account_id/transactions
with the following payload:
{
"destination_account_id": "<account_id>",
"amount": <amount>
}