Skip to content

fizzypop-studio/seltzer-api

Repository files navigation

Seltzer API

Rails API and starter project for Seltzer CLI or yourself.

Install

Check your Ruby version

ruby -v

The ouput should start with something like ruby 3.1.2

If not, install the right ruby version using rbenv (it could take a while):

rbenv install 3.1.2

Install dependencies

Using postgresql for the database so you will need that unless you want to configure your own setup. In order to successfully go throught the initial bundle install you will need it installed via Homebrew

brew install postgresql@14

You can also install the Postgres app as well for a nice way to manage your local databases with a GUI.

Using Bundler

bundle install

Initialize the database

rails db:setup

Serve

rails s

This project is setup to automatically run on port 3001 since the client runs on 3000

Getting Client ID & Client Secret for your clients

This applciation utilizes Doorkeeper to authorize users to your API and makes it easy to introduce OAuth 2 provider functionality to your Ruby on Rails application.. You will need to get the client_id and client_secret for the frontend react client or other clients you decide to create.

  1. Open rails console
rails c
  1. Set Application variable in console
@application = Doorkeeper::Application.find_by(name: "React Client")
  1. Retrieve client id
@application.uid
  1. Retrieve client secret
@application.secret

About

Backend template application for Seltzer CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages