This README would normally document whatever steps are necessary to get the application up and running. This assumes that you already have ruby and rails installed in your machine
-
Ruby version Ruby v6.2
-
System dependencies
- Mysql
- Configuration for Cloning this rails repo
- Clone the repository
- Configure database in config/database.yml
- Run
rake db:migrate - Serve the api using
rails s
- Configuration for New rails project
- Create a rails api project by running
rails new <AppName> --api -d mysql - On the root directory open config/database.yml and fill in database connections parameters in default and development
- Create a model by running
rails g model <modelName> - Open db/migrate and edit the migration file based on model name
- Run rake db:migrate
- Create a controller by using
rails g controller <controllerName> - Fill in controller methods to handle api endpoint
- Run
rails routesto see controller routes - To serve the api run
rails serveorrails s
- Optional Use insertGames.txt file to insert queries in your database