Install these dependencies before starting:
- Git
- Ruby (version 2.7.2)
- Rails (version 6.1.0)
- Postgresql
git clone git@github.com:sivayogasubramanian/just-to-do-it-api.git
This project makes use of .env
file to store environment variables. To get started create a .env file and type these lines into your file. Be sure to replace with your postgres credentials.
POSTGRES_USER=<YOUR-USERNAME>
POSTGRES_PASSWORD=<YOUR-PASSWORD>
Copy these lines. There is no need to replace anything.
POSTGRES_HOST='localhost'
POSTGRES_DEVELOPMENT_DB='just_to_do_it_api_development'
POSTGRES_TEST_DB='just_to_do_it_api_test'
POSTGRES_DB='just_to_do_it_api_production'
After installing the dependencies and setting up the .env file, you can start installing the gems needed by this project by running
bundle install
Then you can create and migrate by running
rails db:create && rails db:migrate
Then you can start the server by running
rails s -p 4000
Now you can visit the site at http://localhost:4000/