Skip to content

git-lama/jwt_api

Repository files navigation

Documentation:

Instructions on how to build/run your application

Pre-requisites:

  1. Latest version of redis and docker needs to be installed

Run the following commands in your terminal:

  1. 'cd /path/to/task_app'
  2. 'rvm gemset create task_app'
  3. 'rvm gemset use task_app'
  4. 'rvm gemset list' to verify (optional)
  5. 'bundle install'
  6. 'yarn install --check-files'
  7. redis-server
  8. Running test-cases:
    • 'bundle exec rspec --format documentation'
  9. Starting the application
    • docker-compose up --build
  10. To create user send request in the following format:
    • 'post '/api/users/create', params: { 'user': {'username': 'test', 'password': '1234578'} }, headers: { 'Content-Type': 'application/json', 'HTTP_API_KEY': 'f294440ff51973cc255e908b8dac234a931c8494' }'
  11. To login user send request in the following format:
    • 'post "/api/users/login", params: { 'user': { 'username': 'test', 'password': '1234578' } }, headers: { 'Content-Type': 'application/json', 'HTTP_API_KEY': 'f294440ff51973cc255e908b8dac234a931c8494' }''
  12. Use the jwt response token from the two api responses for future requests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published