GitXplorerGitXplorer
c

dusty-shoes-server

public
2 stars
1 forks
0 issues

Commits

List of commits on branch main.
Unverified
964dd51e99b698ad9a59d9701f107973924e41b5

Merge branch 'main' of github.com:cmwilson21/dusty-shoes-server

ccmwilson21 committed 3 years ago
Unverified
befcd8b1b35dea772f38817c0378d1477339a089

removed debugger and cleaned up

ccmwilson21 committed 3 years ago
Verified
a2179b1be97b3c447a1f497c513cb5947cf73aec

Update README.md

ccmwilson21 committed 3 years ago
Verified
ee7f5b5d2beb2947b01fcd68c5ad76b103ea9c0a

Update README.md

ccmwilson21 committed 3 years ago
Verified
5b2f73c164554ea10b6e1842e0cfea46a9393aee

Update README.md

ccmwilson21 committed 3 years ago
Verified
3bf45e32bad53951622cafce2c71f22325f8ea4c

Update README.md

ccmwilson21 committed 3 years ago

README

The README file for this repository.

Getting Started With Dusty Shoes Server

This repository is the backend for the Dusty Shoes travel app. Fork and clone this repostiory and run bundle install to prep the backend. To get the React front end going, fork and clone the front end and follow the directions in the README.md.

Once everything is ready, run - rails db:create rails db:migrate rails s

Technologies Used

  • Ruby on Rails
  • JWT Auth
  • Bcrypt
  • RESTful principles
  • Full Crud

Code Preview

Login Process

def create
    @user = User.find_by_email(params[:email])
    if @user && @user.authenticate(params[:password])
      @token = encode_token(user_id: @user.id)
      render json: {user: UserSerializer.new(@user), jwt: @token}, status: :ok
    else
      render json: {errors: ["Email or password did not match"]}, status: 422
    end
  end