An open API service indexing awesome lists of open source software.

https://github.com/neckerfree/workout-backend

Project to store DB information about Workout
https://github.com/neckerfree/workout-backend

Last synced: about 2 months ago
JSON representation

Project to store DB information about Workout

Awesome Lists containing this project

README

          



Workout Backend

# πŸ“— Table of Contents

- [πŸ“– About the Project](#about-project)
- [πŸ›  Built With](#built-with)
- [Tech Stack](#tech-stack)
- [Key Features](#key-features)
- [πŸš€ Live Demo](#live-demo)
- [πŸ’» Getting Started](#getting-started)
- [Setup](#setup)
- [Prerequisites](#prerequisites)
- [Install](#install)
- [Usage](#usage)
- [Run tests](#run-tests)
- [Deployment](#triangular_flag_on_post-deployment)
- [πŸ‘₯ Authors](#authors)
- [πŸ”­ Future Features](#future-features)
- [🀝 Contributing](#contributing)
- [⭐️ Show your support](#support)
- [πŸ™ Acknowledgements](#acknowledgements)
- [❓ FAQ](#faq)
- [πŸ“ License](#license)

# πŸ“– [Workout Backend]

> Describe your project in 1 or 2 sentences.

**[Workout Backend]** This is the backend RoR project that uses a SQL Server database to store data about workout like running or different sport.

## πŸ›  Built With Ruby on rails
## πŸ›  Built With SQL Server

### Tech Stack Ruby on Rails

> Describe the tech stack and include only the relevant sections that apply to your project.

Client

Server

Database

### Key Features

> Describe between 1-3 key features of the application.

- **[API Service]**
- **[JWT]**
- **[Simple Command]**

(back to top)

> Add a link to your deployed project.

(back to top)

## πŸ’» Getting Started

> Describe how a new developer could make use of your project.

### Setup Database
- Make sure that your SQL Server database is installed.
- Open the file config\database.yml
- Modify the connection parameters to point your SQL Server Database:
`adapter: sqlserver`
`dataserver: [server]\[instance]`
`port: 1433`
`username: [your_user]`
`password: [your_password]`

- If required drop existing database : `rake db:drop`
- Create databases for each enviroment (PRD, TEST, DEV): Using SQL Server Management Studio
- Create db structure including tables : `rake db:migrate`
- If required seed initial data (stored in db\seeds.rb file): `rails db:seed`

### Prerequisites

In order to run this project you need:

### Setup

Clone this repository to your desired folder:

To get a local copy up and running follow these simple example steps.
- Clone Repository using
`git clone https://github.com/NeckerFree/Workout-Backend`
- Move into project directory
`cd Workout-Backend`

### Install

Install this project with:

run `bundle install`

### Usage

To run the project, execute the following command:

run `rails server`
After that the service is available by default in localhost:3000
For example POST: localhost:3000/authenticate
request data: {"email":"test@gmail.com","password":"XXXXXX"}

(back to top)

## πŸ‘₯ Authors

> Mention all of the collaborators of this project.

πŸ‘€ **Elio CortΓ©s**

- GitHub: [@NeckerFree](https://github.com/NeckerFree)
- Twitter: [@ElioCortesM](https://twitter.com/ElioCortesM)
- LinkedIn: [elionelsoncortes](https://www.linkedin.com/in/elionelsoncortes/)

(back to top)

(back to top)

## 🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](../../issues/).

(back to top)

## ⭐️ Show your support

> Write a message to encourage readers to support your project

If you like this project please start

(back to top)

(back to top)

## ❓ FAQ

> Add at least 2 questions new developers would ask when they decide to use your project.

- **[How to create a simple RoR token based authentication API? ]**

- [JWT authetication in Rails API](https://www.pluralsight.com/guides/token-based-authentication-with-ruby-on-rails-5-api)

- **[How to connect RoR project to SQL Server database?]**

- [Connect Rails to SQL Server DB](https://www.spritle.com/blogs/2014/01/29/connect-rails-4-with-microsoft-sql-server-database/)
- Commands:
[`gem install activerecord-sqlserver-adapter`
`gem install tiny_tds -- --with-freetds-include=C:\Ruby31-x64\msys64\ucrt64\include\freetds`]

- **[How to generate models, controlers and references in RoR? ]**

- [`rails g model user name email password_digest`
`rails generate model training location:string distance:float duration:time start_hour:time training_date:date feel:integer`
`rails generate migration AddUserRefToTrainings user:references`
`rails generate scaffold_controller Training --no-helper --no-assets --no-controller-specs --no-view-specs`
`rails generate scaffold_controller User --no-helper --no-assets --no-controller-specs --no-view-specs`]

(back to top)

## πŸ“ License

This project is [MIT](./LICENSE) licensed.

(back to top)