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
- Host: GitHub
- URL: https://github.com/neckerfree/workout-backend
- Owner: NeckerFree
- Created: 2022-11-17T00:56:00.000Z (over 3 years ago)
- Default Branch: dev
- Last Pushed: 2022-12-02T00:07:27.000Z (over 3 years ago)
- Last Synced: 2025-03-17T15:57:51.698Z (about 1 year ago)
- Language: Ruby
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)
> 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
> Describe between 1-3 key features of the application.
- **[API Service]**
- **[JWT]**
- **[Simple Command]**
> Add a link to your deployed project.
> 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"}
> 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/)
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](../../issues/).
> Write a message to encourage readers to support your project
If you like this project please start
> 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`]
This project is [MIT](./LICENSE) licensed.